diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-03-15 17:03:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-15 17:03:30 +0100 |
commit | 27886aa18487df48a195279bd64a8460464495dc (patch) | |
tree | 3ff73662e0eb44860146e58b8a5d3abfc86122d5 /lib/private | |
parent | d3957159a147bead57c83dd84e4c345b2d37dd40 (diff) | |
parent | bbb7955caddf57516512c1a1c18b3c2f59a65bdf (diff) | |
download | nextcloud-server-27886aa18487df48a195279bd64a8460464495dc.tar.gz nextcloud-server-27886aa18487df48a195279bd64a8460464495dc.zip |
Merge pull request #40125 from summersab/refactor/OC-Server-getThemingDefaults
Diffstat (limited to 'lib/private')
-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 |
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php index 93365582864..a5273d2f335 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 44f64e09e94..fc02c91a99f 100644 --- a/lib/private/Console/Application.php +++ b/lib/private/Console/Application.php @@ -59,7 +59,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 a8b066263bc..5d897c322d5 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -1348,7 +1348,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 3d384de5842..4701f3af6a9 100644 --- a/lib/private/URLGenerator.php +++ b/lib/private/URLGenerator.php @@ -226,7 +226,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); } @@ -299,7 +299,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); } |