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 /settings/ajax | |
parent | 23137f4798cb89b188329050a85f2f3a706947c5 (diff) | |
download | nextcloud-server-d0266c0bf85e431a3b1b39cbfaced4e8df52a264.tar.gz nextcloud-server-d0266c0bf85e431a3b1b39cbfaced4e8df52a264.zip |
Use public api for getting l10n
Diffstat (limited to 'settings/ajax')
-rw-r--r-- | settings/ajax/apps/ocs.php | 2 | ||||
-rw-r--r-- | settings/ajax/changedisplayname.php | 2 | ||||
-rw-r--r-- | settings/ajax/creategroup.php | 2 | ||||
-rw-r--r-- | settings/ajax/decryptall.php | 2 | ||||
-rw-r--r-- | settings/ajax/deletekeys.php | 2 | ||||
-rw-r--r-- | settings/ajax/installapp.php | 2 | ||||
-rw-r--r-- | settings/ajax/lostpassword.php | 2 | ||||
-rw-r--r-- | settings/ajax/removeuser.php | 4 | ||||
-rw-r--r-- | settings/ajax/restorekeys.php | 2 | ||||
-rw-r--r-- | settings/ajax/setlanguage.php | 2 | ||||
-rw-r--r-- | settings/ajax/setquota.php | 2 | ||||
-rw-r--r-- | settings/ajax/togglegroups.php | 6 | ||||
-rw-r--r-- | settings/ajax/uninstallapp.php | 2 | ||||
-rw-r--r-- | settings/ajax/updateapp.php | 2 |
14 files changed, 17 insertions, 17 deletions
diff --git a/settings/ajax/apps/ocs.php b/settings/ajax/apps/ocs.php index b68083fca6b..aad0690e01c 100644 --- a/settings/ajax/apps/ocs.php +++ b/settings/ajax/apps/ocs.php @@ -8,7 +8,7 @@ OC_JSON::checkAdminUser(); -$l = OC_L10N::get('settings'); +$l = \OC::$server->getL10N('settings'); if(OC_Config::getValue('appstoreenabled', true)==false) { OCP\JSON::success(array('type' => 'external', 'data' => array())); diff --git a/settings/ajax/changedisplayname.php b/settings/ajax/changedisplayname.php index 54c8c05dd4b..1e52182ccf6 100644 --- a/settings/ajax/changedisplayname.php +++ b/settings/ajax/changedisplayname.php @@ -4,7 +4,7 @@ OCP\JSON::callCheck(); OC_JSON::checkLoggedIn(); -$l=OC_L10N::get('settings'); +$l = \OC::$server->getL10N('settings'); $username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser(); $displayName = $_POST["displayName"]; diff --git a/settings/ajax/creategroup.php b/settings/ajax/creategroup.php index 854f2c37189..be376bea9dc 100644 --- a/settings/ajax/creategroup.php +++ b/settings/ajax/creategroup.php @@ -4,7 +4,7 @@ OCP\JSON::callCheck(); OC_JSON::checkAdminUser(); $groupname = $_POST["groupname"]; -$l = OC_L10N::get('settings'); +$l = \OC::$server->getL10N('settings'); // Does the group exist? if( in_array( $groupname, OC_Group::getGroups())) { diff --git a/settings/ajax/decryptall.php b/settings/ajax/decryptall.php index 55685f778d1..527e5b8fcee 100644 --- a/settings/ajax/decryptall.php +++ b/settings/ajax/decryptall.php @@ -12,7 +12,7 @@ $params = array('uid' => \OCP\User::getUser(), $view = new OC\Files\View('/'); $util = new \OCA\Encryption\Util($view, \OCP\User::getUser()); -$l = \OC_L10N::get('settings'); +$l = \OC::$server->getL10N('settings'); $result = $util->initEncryption($params); diff --git a/settings/ajax/deletekeys.php b/settings/ajax/deletekeys.php index 1f84452e117..86a45820af9 100644 --- a/settings/ajax/deletekeys.php +++ b/settings/ajax/deletekeys.php @@ -3,7 +3,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); -$l = \OC_L10N::get('settings'); +$l = \OC::$server->getL10N('settings'); $user = \OC_User::getUser(); $view = new \OC\Files\View('/' . $user . '/files_encryption'); diff --git a/settings/ajax/installapp.php b/settings/ajax/installapp.php index 47f40f2b0cd..80bc1819724 100644 --- a/settings/ajax/installapp.php +++ b/settings/ajax/installapp.php @@ -14,6 +14,6 @@ $result = OC_App::installApp($appId); if($result !== false) { OC_JSON::success(array('data' => array('appid' => $appId))); } else { - $l = OC_L10N::get('settings'); + $l = \OC::$server->getL10N('settings'); OC_JSON::error(array("data" => array( "message" => $l->t("Couldn't remove app.") ))); } diff --git a/settings/ajax/lostpassword.php b/settings/ajax/lostpassword.php index 15b6cbc0122..395ba31f92b 100644 --- a/settings/ajax/lostpassword.php +++ b/settings/ajax/lostpassword.php @@ -3,7 +3,7 @@ OC_JSON::checkLoggedIn(); OCP\JSON::callCheck(); -$l=OC_L10N::get('settings'); +$l = \OC::$server->getL10N('settings'); // Get data if( isset( $_POST['email'] ) && OC_Mail::validateAddress($_POST['email']) ) { diff --git a/settings/ajax/removeuser.php b/settings/ajax/removeuser.php index 8732c6518a8..eda85238780 100644 --- a/settings/ajax/removeuser.php +++ b/settings/ajax/removeuser.php @@ -11,7 +11,7 @@ if(OC_User::getUser() === $username) { } if(!OC_User::isAdminUser(OC_User::getUser()) && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) { - $l = OC_L10N::get('core'); + $l = \OC::$server->getL10N('core'); OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') ))); exit(); } @@ -21,6 +21,6 @@ if( OC_User::deleteUser( $username )) { OC_JSON::success(array("data" => array( "username" => $username ))); } else{ - $l = OC_L10N::get('core'); + $l = \OC::$server->getL10N('core'); OC_JSON::error(array("data" => array( "message" => $l->t("Unable to delete user") ))); } diff --git a/settings/ajax/restorekeys.php b/settings/ajax/restorekeys.php index 68e19c90457..5c263fadab4 100644 --- a/settings/ajax/restorekeys.php +++ b/settings/ajax/restorekeys.php @@ -3,7 +3,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); -$l = \OC_L10N::get('settings'); +$l = \OC::$server->getL10N('settings'); $user = \OC_User::getUser(); $view = new \OC\Files\View('/' . $user . '/files_encryption'); diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php index 94773f3dc70..a3988db85bb 100644 --- a/settings/ajax/setlanguage.php +++ b/settings/ajax/setlanguage.php @@ -1,6 +1,6 @@ <?php -$l=OC_L10N::get('settings'); +$l = \OC::$server->getL10N('settings'); OC_JSON::checkLoggedIn(); OCP\JSON::callCheck(); diff --git a/settings/ajax/setquota.php b/settings/ajax/setquota.php index 2e6de2b759c..f19506a0456 100644 --- a/settings/ajax/setquota.php +++ b/settings/ajax/setquota.php @@ -13,7 +13,7 @@ $username = isset($_POST["username"])?$_POST["username"]:''; if(($username === '' && !OC_User::isAdminUser(OC_User::getUser())) || (!OC_User::isAdminUser(OC_User::getUser()) && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username))) { - $l = OC_L10N::get('core'); + $l = \OC::$server->getL10N('core'); OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') ))); exit(); } diff --git a/settings/ajax/togglegroups.php b/settings/ajax/togglegroups.php index 6963f9eb43c..27cb2b446ec 100644 --- a/settings/ajax/togglegroups.php +++ b/settings/ajax/togglegroups.php @@ -8,7 +8,7 @@ $username = $_POST["username"]; $group = $_POST["group"]; if($username === OC_User::getUser() && $group === "admin" && OC_User::isAdminUser($username)) { - $l = OC_L10N::get('core'); + $l = \OC::$server->getL10N('core'); OC_JSON::error(array( 'data' => array( 'message' => $l->t('Admins can\'t remove themself from the admin group')))); exit(); } @@ -16,7 +16,7 @@ if($username === OC_User::getUser() && $group === "admin" && OC_User::isAdminUs if(!OC_User::isAdminUser(OC_User::getUser()) && (!OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username) || !OC_SubAdmin::isGroupAccessible(OC_User::getUser(), $group))) { - $l = OC_L10N::get('core'); + $l = \OC::$server->getL10N('core'); OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') ))); exit(); } @@ -25,7 +25,7 @@ if(!OC_Group::groupExists($group)) { OC_Group::createGroup($group); } -$l = OC_L10N::get('settings'); +$l = \OC::$server->getL10N('settings'); $error = $l->t("Unable to add user to group %s", $group); $action = "add"; diff --git a/settings/ajax/uninstallapp.php b/settings/ajax/uninstallapp.php index 5c6371dc16f..cae7c33f292 100644 --- a/settings/ajax/uninstallapp.php +++ b/settings/ajax/uninstallapp.php @@ -14,6 +14,6 @@ $result = OC_App::removeApp($appId); if($result !== false) { OC_JSON::success(array('data' => array('appid' => $appId))); } else { - $l = OC_L10N::get('settings'); + $l = \OC::$server->getL10N('settings'); OC_JSON::error(array("data" => array( "message" => $l->t("Couldn't remove app.") ))); } diff --git a/settings/ajax/updateapp.php b/settings/ajax/updateapp.php index afaa9318fb2..6375a41024a 100644 --- a/settings/ajax/updateapp.php +++ b/settings/ajax/updateapp.php @@ -40,6 +40,6 @@ $result = OC_Installer::updateAppByOCSId($appId, $isShipped); if($result !== false) { OC_JSON::success(array('data' => array('appid' => $appId))); } else { - $l = OC_L10N::get('settings'); + $l = \OC::$server->getL10N('settings'); OC_JSON::error(array("data" => array( "message" => $l->t("Couldn't update app.") ))); } |