Use global oc_requesttoken for Event Source

This commit is contained in:
Michael Gapczynski 2013-01-26 16:36:48 -05:00
parent c9e25d3fab
commit 0986b6f910
2 changed files with 1 additions and 2 deletions

View File

@ -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) {

View File

@ -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'));