Skip to content

Commit 27886aa

Browse files
authored
Merge pull request #40125 from summersab/refactor/OC-Server-getThemingDefaults
2 parents d395715 + bbb7955 commit 27886aa

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

lib/private/AppFramework/DependencyInjection/DIContainer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public function __construct(string $appName, array $urlParams = [], ServerContai
173173
});
174174

175175
$this->registerService('OC_Defaults', function (ContainerInterface $c) {
176-
return $c->get(IServerContainer::class)->getThemingDefaults();
176+
return $c->get(IServerContainer::class)->get('ThemingDefaults');
177177
});
178178

179179
$this->registerService('Protocol', function (ContainerInterface $c) {

lib/private/Console/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function __construct(IConfig $config,
5959
IRequest $request,
6060
LoggerInterface $logger,
6161
MemoryInfo $memoryInfo) {
62-
$defaults = \OC::$server->getThemingDefaults();
62+
$defaults = \OC::$server->get('ThemingDefaults');
6363
$this->config = $config;
6464
$this->application = new SymfonyApplication($defaults->getName(), \OC_Util::getVersionString());
6565
$this->dispatcher = $dispatcher;

lib/private/Server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ public function __construct($webRoot, \OC\Config $config) {
13481348

13491349
$this->registerService(Defaults::class, function (Server $c) {
13501350
return new Defaults(
1351-
$c->getThemingDefaults()
1351+
$c->get('ThemingDefaults')
13521352
);
13531353
});
13541354
/** @deprecated 19.0.0 */

lib/private/URLGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public function imagePath(string $appName, string $file): string {
226226
$themingEnabled = $this->config->getSystemValueBool('installed', false) && $this->getAppManager()->isEnabledForUser('theming');
227227
$themingImagePath = false;
228228
if ($themingEnabled) {
229-
$themingDefaults = \OC::$server->getThemingDefaults();
229+
$themingDefaults = \OC::$server->get('ThemingDefaults');
230230
if ($themingDefaults instanceof ThemingDefaults) {
231231
$themingImagePath = $themingDefaults->replaceImagePath($appName, $file);
232232
}
@@ -299,7 +299,7 @@ public function getAbsoluteURL(string $url): string {
299299
* @return string url to the online documentation
300300
*/
301301
public function linkToDocs(string $key): string {
302-
$theme = \OC::$server->getThemingDefaults();
302+
$theme = \OC::$server->get('ThemingDefaults');
303303
return $theme->buildDocLinkToKey($key);
304304
}
305305

lib/public/Defaults.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Defaults {
5252
*/
5353
public function __construct(\OC_Defaults $defaults = null) {
5454
if ($defaults === null) {
55-
$defaults = \OC::$server->getThemingDefaults();
55+
$defaults = \OC::$server->get('ThemingDefaults');
5656
}
5757
$this->defaults = $defaults;
5858
}

0 commit comments

Comments
 (0)