summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-07-15 08:46:31 +0200
committerJoas Schilling <coding@schilljs.com>2016-07-15 09:17:30 +0200
commit2c988ecbf498bebd8ac904e0c457521350cf469f (patch)
tree9a5be8451b1c763c5009b89f52993372cacaf735 /lib
parente8d6621a2485196c66d0743df3072da3b9e9c36b (diff)
downloadnextcloud-server-2c988ecbf498bebd8ac904e0c457521350cf469f.tar.gz
nextcloud-server-2c988ecbf498bebd8ac904e0c457521350cf469f.zip
Use the themed Defaults everywhere
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php2
-rw-r--r--lib/private/Console/Application.php4
-rw-r--r--lib/private/Server.php2
-rw-r--r--lib/private/Setup.php2
-rw-r--r--lib/private/URLGenerator.php4
-rw-r--r--lib/private/legacy/util.php2
-rw-r--r--lib/public/Defaults.php2
7 files changed, 9 insertions, 9 deletions
diff --git a/lib/base.php b/lib/base.php
index 70fac6d707b..62ace1bc0ef 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -812,7 +812,7 @@ class OC {
if (!$systemConfig->getValue('installed', false)) {
\OC::$server->getSession()->clear();
$setupHelper = new OC\Setup(\OC::$server->getConfig(), \OC::$server->getIniWrapper(),
- \OC::$server->getL10N('lib'), new \OC_Defaults(), \OC::$server->getLogger(),
+ \OC::$server->getL10N('lib'), \OC::$server->getThemingDefaults(), \OC::$server->getLogger(),
\OC::$server->getSecureRandom());
$controller = new OC\Core\Controller\SetupController($setupHelper);
$controller->run($_POST);
diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php
index ec91064278e..be561342178 100644
--- a/lib/private/Console/Application.php
+++ b/lib/private/Console/Application.php
@@ -26,8 +26,8 @@
namespace OC\Console;
use OC_App;
-use OC_Defaults;
use OCP\Console\ConsoleEvent;
+use OCP\Defaults;
use OCP\IConfig;
use OCP\IRequest;
use Symfony\Component\Console\Application as SymfonyApplication;
@@ -51,7 +51,7 @@ class Application {
* @param IRequest $request
*/
public function __construct(IConfig $config, EventDispatcherInterface $dispatcher, IRequest $request) {
- $defaults = new OC_Defaults;
+ $defaults = \OC::$server->getThemingDefaults();
$this->config = $config;
$this->application = new SymfonyApplication($defaults->getName(), \OC_Util::getVersionString());
$this->dispatcher = $dispatcher;
diff --git a/lib/private/Server.php b/lib/private/Server.php
index c663bc44261..d69e384ad75 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -562,7 +562,7 @@ class Server extends ServerContainer implements IServerContainer {
return new Mailer(
$c->getConfig(),
$c->getLogger(),
- new \OC_Defaults()
+ $c->getThemingDefaults()
);
});
$this->registerService('OcsClient', function (Server $c) {
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index f1454805a08..7b2c4392360 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -426,7 +426,7 @@ class Setup {
}
$setupHelper = new \OC\Setup($config, \OC::$server->getIniWrapper(),
- \OC::$server->getL10N('lib'), new \OC_Defaults(), \OC::$server->getLogger(),
+ \OC::$server->getL10N('lib'), \OC::$server->getThemingDefaults(), \OC::$server->getLogger(),
\OC::$server->getSecureRandom());
$htaccessContent = file_get_contents($setupHelper->pathToHtaccess());
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php
index 9ae99d67bc6..c7b2b222faf 100644
--- a/lib/private/URLGenerator.php
+++ b/lib/private/URLGenerator.php
@@ -29,7 +29,7 @@
*/
namespace OC;
-use OC_Defaults;
+use OCP\Defaults;
use OCP\ICacheFactory;
use OCP\IConfig;
use OCP\IURLGenerator;
@@ -222,7 +222,7 @@ class URLGenerator implements IURLGenerator {
* @return string url to the online documentation
*/
public function linkToDocs($key) {
- $theme = new OC_Defaults();
+ $theme = \OC::$server->getThemingDefaults();
return $theme->buildDocLinkToKey($key);
}
}
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index 2a876eda4d0..63da546ec82 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -631,7 +631,7 @@ class OC_Util {
$webServerRestart = false;
$setup = new \OC\Setup($config, \OC::$server->getIniWrapper(), \OC::$server->getL10N('lib'),
- new \OC_Defaults(), \OC::$server->getLogger(), \OC::$server->getSecureRandom());
+ \OC::$server->getThemingDefaults(), \OC::$server->getLogger(), \OC::$server->getSecureRandom());
$urlGenerator = \OC::$server->getURLGenerator();
diff --git a/lib/public/Defaults.php b/lib/public/Defaults.php
index 791ed5827de..5194484fea2 100644
--- a/lib/public/Defaults.php
+++ b/lib/public/Defaults.php
@@ -51,7 +51,7 @@ class Defaults {
* @since 6.0.0
*/
function __construct() {
- $this->defaults = new \OC_Defaults();
+ $this->defaults = \OC::$server->getThemingDefaults();
}
/**