Merge pull request #1326 from owncloud/event-source-token

Use global oc_requesttoken for Event Source
This commit is contained in:
Lukas Reschke 2013-01-26 15:18:23 -08:00
commit 9e498b6548
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'));