diff options
author | Joas Schilling <coding@schilljs.com> | 2016-07-15 08:46:31 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-07-15 09:17:30 +0200 |
commit | 2c988ecbf498bebd8ac904e0c457521350cf469f (patch) | |
tree | 9a5be8451b1c763c5009b89f52993372cacaf735 /core | |
parent | e8d6621a2485196c66d0743df3072da3b9e9c36b (diff) | |
download | nextcloud-server-2c988ecbf498bebd8ac904e0c457521350cf469f.tar.gz nextcloud-server-2c988ecbf498bebd8ac904e0c457521350cf469f.zip |
Use the themed Defaults everywhere
Diffstat (limited to 'core')
-rw-r--r-- | core/Application.php | 6 | ||||
-rw-r--r-- | core/Command/Maintenance/Install.php | 2 | ||||
-rw-r--r-- | core/Controller/LostController.php | 8 |
3 files changed, 7 insertions, 9 deletions
diff --git a/core/Application.php b/core/Application.php index a87917b626a..1485f7a7516 100644 --- a/core/Application.php +++ b/core/Application.php @@ -35,7 +35,7 @@ use OC\Core\Controller\LostController; use OC\Core\Controller\TokenController; use OC\Core\Controller\TwoFactorChallengeController; use OC\Core\Controller\UserController; -use OC_Defaults; +use OCP\Defaults; use OCP\AppFramework\App; use OCP\Util; @@ -165,8 +165,8 @@ class Application extends App { $container->registerService('UserFolder', function(SimpleContainer $c) { return $c->query('ServerContainer')->getUserFolder(); }); - $container->registerService('Defaults', function() { - return new OC_Defaults; + $container->registerService('Defaults', function(SimpleContainer $c) { + return $c->query('ServerContainer')->getThemingDefaults(); }); $container->registerService('Mailer', function(SimpleContainer $c) { return $c->query('ServerContainer')->getMailer(); diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php index cee0c60b488..3e9e043b036 100644 --- a/core/Command/Maintenance/Install.php +++ b/core/Command/Maintenance/Install.php @@ -64,7 +64,7 @@ class Install extends Command { // validate the environment $server = \OC::$server; $setupHelper = new Setup($this->config, $server->getIniWrapper(), - $server->getL10N('lib'), new \OC_Defaults(), $server->getLogger(), + $server->getL10N('lib'), $server->getThemingDefaults(), $server->getLogger(), $server->getSecureRandom()); $sysInfo = $setupHelper->getSystemInfo(true); $errors = $sysInfo['errors']; diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index b509d4bf632..774404af0a5 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -38,7 +38,6 @@ use \OCP\IConfig; use OCP\IUserManager; use OCP\Mail\IMailer; use OCP\Security\ISecureRandom; -use \OC_Defaults; use OCP\Security\StringUtils; /** @@ -54,8 +53,7 @@ class LostController extends Controller { protected $urlGenerator; /** @var IUserManager */ protected $userManager; - // FIXME: Inject a non-static factory of OC_Defaults for better unit-testing - /** @var OC_Defaults */ + /** @var \OC_Defaults */ protected $defaults; /** @var IL10N */ protected $l10n; @@ -77,7 +75,7 @@ class LostController extends Controller { * @param IRequest $request * @param IURLGenerator $urlGenerator * @param IUserManager $userManager - * @param OC_Defaults $defaults + * @param \OC_Defaults $defaults * @param IL10N $l10n * @param IConfig $config * @param ISecureRandom $secureRandom @@ -90,7 +88,7 @@ class LostController extends Controller { IRequest $request, IURLGenerator $urlGenerator, IUserManager $userManager, - OC_Defaults $defaults, + \OC_Defaults $defaults, IL10N $l10n, IConfig $config, ISecureRandom $secureRandom, |