summaryrefslogtreecommitdiffstats
path: root/lib/private/eventsource.php
diff options
context:
space:
mode:
authortomneedham <tom@owncloud.com>2014-01-04 13:46:08 +0000
committertomneedham <tom@owncloud.com>2014-01-04 13:46:08 +0000
commit1824ae12225a32d29d5738215f169c1aa3534e8b (patch)
tree328c3f3c8cf9819174872d687c3d3a00dd0040ca /lib/private/eventsource.php
parentac85dea267261a58ae815c257098a3ae6ed42b80 (diff)
parentaaa48576eec42388bc923a60aeb9c92ef2ff9ca4 (diff)
downloadnextcloud-server-1824ae12225a32d29d5738215f169c1aa3534e8b.tar.gz
nextcloud-server-1824ae12225a32d29d5738215f169c1aa3534e8b.zip
Merge branch 'master' into fix-5388-master
Diffstat (limited to 'lib/private/eventsource.php')
-rw-r--r--lib/private/eventsource.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/eventsource.php b/lib/private/eventsource.php
index a83084d9251..4df0bc2e7cd 100644
--- a/lib/private/eventsource.php
+++ b/lib/private/eventsource.php
@@ -64,13 +64,13 @@ class OC_EventSource{
}
if($this->fallback) {
$response='<script type="text/javascript">window.parent.OC.EventSource.fallBackCallBack('
- .$this->fallBackId.',"'.$type.'",'.json_encode($data).')</script>'.PHP_EOL;
+ .$this->fallBackId.',"' . $type . '",' . OCP\JSON::encode($data) . ')</script>' . PHP_EOL;
echo $response;
}else{
if($type) {
- echo 'event: '.$type.PHP_EOL;
+ echo 'event: ' . $type.PHP_EOL;
}
- echo 'data: '.json_encode($data).PHP_EOL;
+ echo 'data: ' . OCP\JSON::encode($data) . PHP_EOL;
}
echo PHP_EOL;
flush();