diff options
author | Andrew Summers <18727110+summersab@users.noreply.github.com> | 2023-08-29 18:54:23 -0500 |
---|---|---|
committer | Andrew Summers <18727110+summersab@users.noreply.github.com> | 2023-08-29 21:33:17 -0500 |
commit | ce74bdcda244172cbe90dc792e30128802a78828 (patch) | |
tree | 21b797b1af233b8f0c1be8edec57cca8ff141f83 /lib | |
parent | 9d1547f59d53b46ba401ddf0e7f4c6e4f067004e (diff) | |
download | nextcloud-server-ce74bdcda244172cbe90dc792e30128802a78828.tar.gz nextcloud-server-ce74bdcda244172cbe90dc792e30128802a78828.zip |
Refactor `OC\Server::getThemingDefaults`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/AppFramework/DependencyInjection/DIContainer.php | 2 | ||||
-rw-r--r-- | lib/private/Console/Application.php | 2 | ||||
-rw-r--r-- | lib/private/Server.php | 2 | ||||
-rw-r--r-- | lib/private/URLGenerator.php | 4 | ||||
-rw-r--r-- | lib/public/Defaults.php | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php index a012d1e8ea6..e4a06d9d4e0 100644 --- a/lib/private/AppFramework/DependencyInjection/DIContainer.php +++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php @@ -173,7 +173,7 @@ class DIContainer extends SimpleContainer implements IAppContainer { }); $this->registerService('OC_Defaults', function (ContainerInterface $c) { - return $c->get(IServerContainer::class)->getThemingDefaults(); + return $c->get(IServerContainer::class)->get('ThemingDefaults'); }); $this->registerService('Protocol', function (ContainerInterface $c) { diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php index 113f0507ef5..c18a38ce82c 100644 --- a/lib/private/Console/Application.php +++ b/lib/private/Console/Application.php @@ -64,7 +64,7 @@ class Application { IRequest $request, LoggerInterface $logger, MemoryInfo $memoryInfo) { - $defaults = \OC::$server->getThemingDefaults(); + $defaults = \OC::$server->get('ThemingDefaults'); $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 e8ade23d8fe..3629c266517 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -1341,7 +1341,7 @@ class Server extends ServerContainer implements IServerContainer { $this->registerService(Defaults::class, function (Server $c) { return new Defaults( - $c->getThemingDefaults() + $c->get('ThemingDefaults') ); }); /** @deprecated 19.0.0 */ diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php index 3a52b99889c..187deb99150 100644 --- a/lib/private/URLGenerator.php +++ b/lib/private/URLGenerator.php @@ -217,7 +217,7 @@ class URLGenerator implements IURLGenerator { $themingEnabled = $this->config->getSystemValueBool('installed', false) && $this->getAppManager()->isEnabledForUser('theming'); $themingImagePath = false; if ($themingEnabled) { - $themingDefaults = \OC::$server->getThemingDefaults(); + $themingDefaults = \OC::$server->get('ThemingDefaults'); if ($themingDefaults instanceof ThemingDefaults) { $themingImagePath = $themingDefaults->replaceImagePath($appName, $file); } @@ -290,7 +290,7 @@ class URLGenerator implements IURLGenerator { * @return string url to the online documentation */ public function linkToDocs(string $key): string { - $theme = \OC::$server->getThemingDefaults(); + $theme = \OC::$server->get('ThemingDefaults'); return $theme->buildDocLinkToKey($key); } diff --git a/lib/public/Defaults.php b/lib/public/Defaults.php index a295db120ad..63568b27294 100644 --- a/lib/public/Defaults.php +++ b/lib/public/Defaults.php @@ -52,7 +52,7 @@ class Defaults { */ public function __construct(\OC_Defaults $defaults = null) { if ($defaults === null) { - $defaults = \OC::$server->getThemingDefaults(); + $defaults = \OC::$server->get('ThemingDefaults'); } $this->defaults = $defaults; } |