Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-04-14 18:44:15 +0400
committerRobin Appelman <icewind@owncloud.com>2012-04-14 18:44:15 +0400
commitb1bcc60d83866627b1b28a0eda336e0f246dbe8e (patch)
treea7100fbd8425e90c8b90888bc16a15349519038a /lib/json.php
parent721311c9099780ecc22b6b186ed79dc5c9c92271 (diff)
reuse OC_L10N objects
Diffstat (limited to 'lib/json.php')
-rw-r--r--lib/json.php6
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();
}