diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-02-01 16:13:27 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-02-05 11:16:04 +0100 |
commit | b2e9e0fa0d6c50892e94b4ad325ef59fe41dfad9 (patch) | |
tree | 64e2799ed769ae19605eb94df57f995a02f3330b /apps | |
parent | 961ccee5f6cd08d8e06aea7f2e4e432cdb7d88e0 (diff) | |
download | nextcloud-server-b2e9e0fa0d6c50892e94b4ad325ef59fe41dfad9.tar.gz nextcloud-server-b2e9e0fa0d6c50892e94b4ad325ef59fe41dfad9.zip |
chore: Replace OC::$server->getL10N by OCP\Util::getL10N in lib and some apps
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/lib/Helper.php | 2 | ||||
-rw-r--r-- | apps/files_external/lib/MountConfig.php | 2 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Trashbin.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/ajax/clearMappings.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/ajax/deleteConfiguration.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/ajax/testConfiguration.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/ajax/wizard.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/lib/Access.php | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/apps/files/lib/Helper.php b/apps/files/lib/Helper.php index 1d9591cafe0..680df4f16c7 100644 --- a/apps/files/lib/Helper.php +++ b/apps/files/lib/Helper.php @@ -48,7 +48,7 @@ class Helper { public static function buildFileStorageStatistics($dir) { // information about storage capacities $storageInfo = \OC_Helper::getStorageInfo($dir); - $l = \OC::$server->getL10N('files'); + $l = \OCP\Util::getL10N('files'); $maxUploadFileSize = \OCP\Util::maxUploadFilesize($dir, $storageInfo['free']); $maxHumanFileSize = \OCP\Util::humanFileSize($maxUploadFileSize); $maxHumanFileSize = $l->t('Upload (max. %s)', [$maxHumanFileSize]); diff --git a/apps/files_external/lib/MountConfig.php b/apps/files_external/lib/MountConfig.php index 98b34b0c9f2..5ddff0f57fc 100644 --- a/apps/files_external/lib/MountConfig.php +++ b/apps/files_external/lib/MountConfig.php @@ -152,7 +152,7 @@ class MountConfig { * @param Backend[] $backends */ public static function dependencyMessage(array $backends): string { - $l = \OC::$server->getL10N('files_external'); + $l = \OCP\Util::getL10N('files_external'); $message = ''; $dependencyGroups = []; diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php index 442abc13670..ced40313d62 100644 --- a/apps/files_trashbin/lib/Trashbin.php +++ b/apps/files_trashbin/lib/Trashbin.php @@ -1069,7 +1069,7 @@ class Trashbin { private static function getUniqueFilename($location, $filename, View $view) { $ext = pathinfo($filename, PATHINFO_EXTENSION); $name = pathinfo($filename, PATHINFO_FILENAME); - $l = \OC::$server->getL10N('files_trashbin'); + $l = \OCP\Util::getL10N('files_trashbin'); $location = '/' . trim($location, '/'); diff --git a/apps/user_ldap/ajax/clearMappings.php b/apps/user_ldap/ajax/clearMappings.php index 395e3ec3016..ecc45a60de7 100644 --- a/apps/user_ldap/ajax/clearMappings.php +++ b/apps/user_ldap/ajax/clearMappings.php @@ -50,7 +50,7 @@ try { } if ($mapping === null || !$result) { - $l = \OC::$server->getL10N('user_ldap'); + $l = \OCP\Util::getL10N('user_ldap'); throw new \Exception($l->t('Failed to clear the mappings.')); } \OC_JSON::success(); diff --git a/apps/user_ldap/ajax/deleteConfiguration.php b/apps/user_ldap/ajax/deleteConfiguration.php index 82bfb6de82a..2f1ca3d724f 100644 --- a/apps/user_ldap/ajax/deleteConfiguration.php +++ b/apps/user_ldap/ajax/deleteConfiguration.php @@ -35,6 +35,6 @@ $helper = new \OCA\User_LDAP\Helper(\OC::$server->getConfig(), \OC::$server->get if ($helper->deleteServerConfiguration($prefix)) { \OC_JSON::success(); } else { - $l = \OC::$server->getL10N('user_ldap'); + $l = \OCP\Util::getL10N('user_ldap'); \OC_JSON::error(['message' => $l->t('Failed to delete the server configuration')]); } diff --git a/apps/user_ldap/ajax/testConfiguration.php b/apps/user_ldap/ajax/testConfiguration.php index 9d89b641d66..187eeb4295b 100644 --- a/apps/user_ldap/ajax/testConfiguration.php +++ b/apps/user_ldap/ajax/testConfiguration.php @@ -30,7 +30,7 @@ \OC_JSON::checkAppEnabled('user_ldap'); \OC_JSON::callCheck(); -$l = \OC::$server->getL10N('user_ldap'); +$l = \OCP\Util::getL10N('user_ldap'); $ldapWrapper = new OCA\User_LDAP\LDAP(); $connection = new \OCA\User_LDAP\Connection($ldapWrapper, $_POST['ldap_serverconfig_chooser']); diff --git a/apps/user_ldap/ajax/wizard.php b/apps/user_ldap/ajax/wizard.php index 8692251c7c0..63241667825 100644 --- a/apps/user_ldap/ajax/wizard.php +++ b/apps/user_ldap/ajax/wizard.php @@ -31,7 +31,7 @@ \OC_JSON::checkAppEnabled('user_ldap'); \OC_JSON::callCheck(); -$l = \OC::$server->getL10N('user_ldap'); +$l = \OCP\Util::getL10N('user_ldap'); if (!isset($_POST['action'])) { \OC_JSON::error(['message' => $l->t('No action specified')]); diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index e608d5f80f0..70f9e1411b1 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -354,7 +354,7 @@ class Access extends LDAPUtility { return @$this->invokeLDAPMethod('exopPasswd', $userDN, '', $password) || @$this->invokeLDAPMethod('modReplace', $userDN, $password); } catch (ConstraintViolationException $e) { - throw new HintException('Password change rejected.', \OC::$server->getL10N('user_ldap')->t('Password change rejected. Hint: ') . $e->getMessage(), (int)$e->getCode()); + throw new HintException('Password change rejected.', \OCP\Util::getL10N('user_ldap')->t('Password change rejected. Hint: ') . $e->getMessage(), (int)$e->getCode()); } } |