diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-08-31 10:05:59 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-08-31 10:08:22 +0200 |
commit | d0266c0bf85e431a3b1b39cbfaced4e8df52a264 (patch) | |
tree | dfea49fa907a3b7543f8849077d75cfc29a54279 /lib/private/json.php | |
parent | 23137f4798cb89b188329050a85f2f3a706947c5 (diff) | |
download | nextcloud-server-d0266c0bf85e431a3b1b39cbfaced4e8df52a264.tar.gz nextcloud-server-d0266c0bf85e431a3b1b39cbfaced4e8df52a264.zip |
Use public api for getting l10n
Diffstat (limited to 'lib/private/json.php')
-rw-r--r-- | lib/private/json.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/json.php b/lib/private/json.php index da38654997f..f2719dd2bc7 100644 --- a/lib/private/json.php +++ b/lib/private/json.php @@ -25,7 +25,7 @@ class OC_JSON{ */ public static function checkAppEnabled($app) { if( !OC_App::isEnabled($app)) { - $l = OC_L10N::get('lib'); + $l = \OC::$server->getL10N('lib'); self::error(array( 'data' => array( 'message' => $l->t('Application is not enabled'), 'error' => 'application_not_enabled' ))); exit(); } @@ -36,7 +36,7 @@ class OC_JSON{ */ public static function checkLoggedIn() { if( !OC_User::isLoggedIn()) { - $l = OC_L10N::get('lib'); + $l = \OC::$server->getL10N('lib'); self::error(array( 'data' => array( 'message' => $l->t('Authentication error'), 'error' => 'authentication_error' ))); exit(); } @@ -47,7 +47,7 @@ class OC_JSON{ */ public static function callCheck() { if( !OC_Util::isCallRegistered()) { - $l = OC_L10N::get('lib'); + $l = \OC::$server->getL10N('lib'); self::error(array( 'data' => array( 'message' => $l->t('Token expired. Please reload page.'), 'error' => 'token_expired' ))); exit(); } @@ -58,7 +58,7 @@ class OC_JSON{ */ public static function checkAdminUser() { if( !OC_User::isAdminUser(OC_User::getUser())) { - $l = OC_L10N::get('lib'); + $l = \OC::$server->getL10N('lib'); self::error(array( 'data' => array( 'message' => $l->t('Authentication error'), 'error' => 'authentication_error' ))); exit(); } @@ -70,7 +70,7 @@ class OC_JSON{ */ public static function checkUserExists($user) { if (!OCP\User::userExists($user)) { - $l = OC_L10N::get('lib'); + $l = \OC::$server->getL10N('lib'); OCP\JSON::error(array('data' => array('message' => $l->t('Unknown user'), 'error' => 'unknown_user' ))); exit; } @@ -83,7 +83,7 @@ class OC_JSON{ */ public static function checkSubAdminUser() { if(!OC_SubAdmin::isSubAdmin(OC_User::getUser())) { - $l = OC_L10N::get('lib'); + $l = \OC::$server->getL10N('lib'); self::error(array( 'data' => array( 'message' => $l->t('Authentication error'), 'error' => 'authentication_error' ))); exit(); } |