Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-12-10 18:32:48 +0400
committerVincent Petry <pvince81@owncloud.com>2013-12-12 13:38:12 +0400
commit335b2f40a631f7188ab921d69289acaf31908c6e (patch)
tree144c2f7233a0b27b6cae5fc0a81f817b968770f1 /lib/private/eventsource.php
parent3084a52a970c83ca35135f490b9bcb06b9900867 (diff)
Fixed download file from URL error messages
- L10N now converted to string to make them work with json_encode - Added specific error message when server doesn't allow fopen on URLs - Fixed client side to correctly show error message in a notification - Added OCP\JSON::encode() method to encode JSON with support for the OC_L10N_String values
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();