aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/eventsource.php
diff options
context:
space:
mode:
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();