Merge pull request #1326 from owncloud/event-source-token
Use global oc_requesttoken for Event Source
This commit is contained in:
commit
9e498b6548
|
@ -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