diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-09-03 11:04:49 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-09-03 11:04:49 +0200 |
commit | 77c0adb520adcb100d2ef4fd0562330b209ee9ea (patch) | |
tree | 9bae923fa05f312c033722ad2c711cec01758ab0 /lib/private/json.php | |
parent | 50b430ee7cadd6be1520d63acdac27bc06581e09 (diff) | |
parent | fe74b397a53b8a568c15d1ccf779bc8b0425b3c5 (diff) | |
download | nextcloud-server-77c0adb520adcb100d2ef4fd0562330b209ee9ea.tar.gz nextcloud-server-77c0adb520adcb100d2ef4fd0562330b209ee9ea.zip |
Merge branch 'securityutils' of https://github.com/owncloud/core into securityutils
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(); } |