From 335b2f40a631f7188ab921d69289acaf31908c6e Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 10 Dec 2013 15:32:48 +0100 Subject: 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 --- lib/public/json.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/public') 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)); + } } -- cgit v1.2.3