Use global oc_requesttoken for Event Source
This commit is contained in:
parent
c9e25d3fab
commit
0986b6f910
|
@ -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'));
|
||||
|
|
Loading…
Reference in New Issue