Use global oc_requesttoken for Event Source

This commit is contained in:
Michael Gapczynski 2013-01-26 16:36:48 -05:00
Родитель c9e25d3fab
Коммит 0986b6f910
2 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -40,7 +40,7 @@ OC.EventSource=function(src,data){
dataStr+=name+'='+encodeURIComponent(data[name])+'&';
}
}
dataStr+='requesttoken='+OC.EventSource.requesttoken;
dataStr+='requesttoken='+oc_requesttoken;
if(!this.useFallBack && typeof EventSource !='undefined'){
var joinChar = '&';
if(src.indexOf('?') == -1) {

Просмотреть файл

@ -5,7 +5,6 @@
</ul>
<script>
$(document).ready(function () {
OC.EventSource.requesttoken = oc_requesttoken;
var updateEventSource = new OC.EventSource(OC.webroot+'/core/ajax/update.php');
updateEventSource.listen('success', function(message) {
$('<span>').append(message).append('<br />').appendTo($('.update'));