summaryrefslogtreecommitdiffstats
path: root/lib/public/json.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-12-10 15:32:48 +0100
committerVincent Petry <pvince81@owncloud.com>2013-12-12 10:38:12 +0100
commit335b2f40a631f7188ab921d69289acaf31908c6e (patch)
tree144c2f7233a0b27b6cae5fc0a81f817b968770f1 /lib/public/json.php
parent3084a52a970c83ca35135f490b9bcb06b9900867 (diff)
downloadnextcloud-server-335b2f40a631f7188ab921d69289acaf31908c6e.tar.gz
nextcloud-server-335b2f40a631f7188ab921d69289acaf31908c6e.zip
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/public/json.php')
-rw-r--r--lib/public/json.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/public/json.php b/lib/public/json.php
index 134f724b0e6..831e3ef1cf6 100644
--- a/lib/public/json.php
+++ b/lib/public/json.php
@@ -169,4 +169,12 @@ class JSON {
public static function checkAdminUser() {
return(\OC_JSON::checkAdminUser());
}
+
+ /**
+ * Encode JSON
+ * @param array $data
+ */
+ public static function encode($data) {
+ return(\OC_JSON::encode($data));
+ }
}