diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-10-28 21:46:28 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-10-28 21:46:28 +0200 |
commit | 740659a04c28f8b2bfd9265d459dd3bca202300f (patch) | |
tree | d800c3896184bdfc00333f4067c4d567b8ab6d4b /lib | |
parent | f2cae3cee127220a5fde2726af8074837ee81ed1 (diff) | |
download | nextcloud-server-740659a04c28f8b2bfd9265d459dd3bca202300f.tar.gz nextcloud-server-740659a04c28f8b2bfd9265d459dd3bca202300f.zip |
Move away from OC_L10N
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/AppFramework/DependencyInjection/DIContainer.php | 3 | ||||
-rw-r--r-- | lib/private/Setup/AbstractDatabase.php | 5 | ||||
-rw-r--r-- | lib/private/TemplateLayout.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/util.php | 2 | ||||
-rw-r--r-- | lib/public/Util.php | 2 |
5 files changed, 9 insertions, 5 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php index 671093ff08b..a1e845f132e 100644 --- a/lib/private/AppFramework/DependencyInjection/DIContainer.php +++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php @@ -533,6 +533,9 @@ class DIContainer extends SimpleContainer implements IAppContainer { $this->query('OC\CapabilitiesManager')->registerCapability(function() use ($serviceName) { return $this->query($serviceName); }); + } + public function query($name) { + return parent::query($name); } } diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php index 47c3e5ee1c6..2b9d7afb367 100644 --- a/lib/private/Setup/AbstractDatabase.php +++ b/lib/private/Setup/AbstractDatabase.php @@ -29,12 +29,13 @@ namespace OC\Setup; use OC\AllConfig; use OC\DB\ConnectionFactory; use OCP\IConfig; +use OCP\IL10N; use OCP\ILogger; use OCP\Security\ISecureRandom; abstract class AbstractDatabase { - /** @var \OC_L10N */ + /** @var IL10N */ protected $trans; /** @var string */ protected $dbDefinitionFile; @@ -57,7 +58,7 @@ abstract class AbstractDatabase { /** @var ISecureRandom */ protected $random; - public function __construct($trans, $dbDefinitionFile, IConfig $config, ILogger $logger, ISecureRandom $random) { + public function __construct(IL10N $trans, $dbDefinitionFile, IConfig $config, ILogger $logger, ISecureRandom $random) { $this->trans = $trans; $this->dbDefinitionFile = $dbDefinitionFile; $this->config = $config; diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 9f89174e7f9..7878737bdef 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -127,7 +127,7 @@ class TemplateLayout extends \OC_Template { } // Send the language to our layouts - $this->assign('language', \OC_L10N::findLanguage()); + $this->assign('language', \OC::$server->getL10NFactory()->findLanguage()); if(\OC::$server->getSystemConfig()->getValue('installed', false)) { if (empty(self::$versionHash)) { diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index 42fd0ba7db3..e4c2caeafd7 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -526,7 +526,7 @@ class OC_Util { */ public static function addTranslations($application, $languageCode = null, $prepend = false) { if (is_null($languageCode)) { - $languageCode = \OC_L10N::findLanguage($application); + $languageCode = \OC::$server->getL10NFactory()->findLanguage($application); } if (!empty($application)) { $path = "$application/l10n/$languageCode"; diff --git a/lib/public/Util.php b/lib/public/Util.php index d5b0752553d..08661fd88ca 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -195,7 +195,7 @@ class Util { * get l10n object * @param string $application * @param string|null $language - * @return \OC_L10N + * @return \OCP\IL10N * @since 6.0.0 - parameter $language was added in 8.0.0 */ public static function getL10N($application, $language = null) { |