diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-04-14 16:44:15 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-04-14 16:44:15 +0200 |
commit | b1bcc60d83866627b1b28a0eda336e0f246dbe8e (patch) | |
tree | a7100fbd8425e90c8b90888bc16a15349519038a /lib/json.php | |
parent | 721311c9099780ecc22b6b186ed79dc5c9c92271 (diff) | |
download | nextcloud-server-b1bcc60d83866627b1b28a0eda336e0f246dbe8e.tar.gz nextcloud-server-b1bcc60d83866627b1b28a0eda336e0f246dbe8e.zip |
reuse OC_L10N objects
Diffstat (limited to 'lib/json.php')
-rw-r--r-- | lib/json.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/json.php b/lib/json.php index cedf79fd7c3..0d208ce12a2 100644 --- a/lib/json.php +++ b/lib/json.php @@ -24,7 +24,7 @@ class OC_JSON{ */ public static function checkAppEnabled($app){ if( !OC_App::isEnabled($app)){ - $l = new OC_L10N('core'); + $l = OC_L10N::get('core'); self::error(array( 'data' => array( 'message' => $l->t('Application is not enabled') ))); exit(); } @@ -35,7 +35,7 @@ class OC_JSON{ */ public static function checkLoggedIn(){ if( !OC_User::isLoggedIn()){ - $l = new OC_L10N('core'); + $l = OC_L10N::get('core'); self::error(array( 'data' => array( 'message' => $l->t('Authentication error') ))); exit(); } @@ -47,7 +47,7 @@ class OC_JSON{ public static function checkAdminUser(){ self::checkLoggedIn(); if( !OC_Group::inGroup( OC_User::getUser(), 'admin' )){ - $l = new OC_L10N('core'); + $l = OC_L10N::get('core'); self::error(array( 'data' => array( 'message' => $l->t('Authentication error') ))); exit(); } |