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/user_ldap | |
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/user_ldap')
-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 |
5 files changed, 5 insertions, 5 deletions
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()); } } |