diff options
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Files/View.php | 10 | ||||
-rw-r--r-- | lib/private/Share/Share.php | 4 | ||||
-rw-r--r-- | lib/private/Tags.php | 2 | ||||
-rw-r--r-- | lib/private/TemplateLayout.php | 2 | ||||
-rw-r--r-- | lib/private/User/Manager.php | 2 | ||||
-rw-r--r-- | lib/private/User/Session.php | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index df8990790bb..2f8f3c08a80 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1846,19 +1846,19 @@ class View { [$storage, $internalPath] = $this->resolvePath($path); $storage->verifyPath($internalPath, $fileName); } catch (ReservedWordException $ex) { - $l = \OC::$server->getL10N('lib'); + $l = \OCP\Util::getL10N('lib'); throw new InvalidPathException($l->t('File name is a reserved word')); } catch (InvalidCharacterInPathException $ex) { - $l = \OC::$server->getL10N('lib'); + $l = \OCP\Util::getL10N('lib'); throw new InvalidPathException($l->t('File name contains at least one invalid character')); } catch (FileNameTooLongException $ex) { - $l = \OC::$server->getL10N('lib'); + $l = \OCP\Util::getL10N('lib'); throw new InvalidPathException($l->t('File name is too long')); } catch (InvalidDirectoryException $ex) { - $l = \OC::$server->getL10N('lib'); + $l = \OCP\Util::getL10N('lib'); throw new InvalidPathException($l->t('Dot files are not allowed')); } catch (EmptyFileNameException $ex) { - $l = \OC::$server->getL10N('lib'); + $l = \OCP\Util::getL10N('lib'); throw new InvalidPathException($l->t('Empty filename is not allowed')); } } diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php index 3aa01b3cf29..8322c141b1f 100644 --- a/lib/private/Share/Share.php +++ b/lib/private/Share/Share.php @@ -256,8 +256,8 @@ class Share extends Constants { * @throws \Exception */ public static function getBackend($itemType) { - $l = \OC::$server->getL10N('lib'); - $logger = \OC::$server->get(LoggerInterface::class); + $l = \OCP\Util::getL10N('lib'); + $logger = \OCP\Server::get(LoggerInterface::class); if (isset(self::$backends[$itemType])) { return self::$backends[$itemType]; } elseif (isset(self::$backendTypes[$itemType]['class'])) { diff --git a/lib/private/Tags.php b/lib/private/Tags.php index 766166beadd..7b0c5093245 100644 --- a/lib/private/Tags.php +++ b/lib/private/Tags.php @@ -235,7 +235,7 @@ class Tags implements ITags { } if ($tagId === false) { - $l10n = \OC::$server->getL10N('core'); + $l10n = \OCP\Util::getL10N('core'); throw new \Exception( $l10n->t('Could not find category "%s"', [$tag]) ); diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 96d0ae3e517..b4490dfe101 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -249,7 +249,7 @@ class TemplateLayout extends \OC_Template { // this is on purpose outside of the if statement below so that the initial state is prefilled (done in the getConfig() call) // see https://github.com/nextcloud/server/pull/22636 for details $jsConfigHelper = new JSConfigHelper( - \OC::$server->getL10N('lib'), + \OCP\Util::getL10N('lib'), \OCP\Server::get(Defaults::class), \OC::$server->getAppManager(), \OC::$server->getSession(), diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index 5013c9bed7a..705f5fbe66b 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -445,7 +445,7 @@ class Manager extends PublicEmitter implements IUserManager { * @throws \InvalidArgumentException */ public function createUserFromBackend($uid, $password, UserInterface $backend) { - $l = \OC::$server->getL10N('lib'); + $l = \OCP\Util::getL10N('lib'); $this->validateUserId($uid, true); diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index a411326c93f..b7f29134379 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -367,7 +367,7 @@ class Session implements IUserSession, Emitter { if (!$user->isEnabled()) { // disabled users can not log in // injecting l10n does not work - there is a circular dependency between session and \OCP\L10N\IFactory - $message = \OC::$server->getL10N('lib')->t('User disabled'); + $message = \OCP\Util::getL10N('lib')->t('User disabled'); throw new LoginException($message); } @@ -406,7 +406,7 @@ class Session implements IUserSession, Emitter { return true; } - $message = \OC::$server->getL10N('lib')->t('Login canceled by app'); + $message = \OCP\Util::getL10N('lib')->t('Login canceled by app'); throw new LoginException($message); } |