]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix loading custom background 34212/head
authorVincent Petry <vincent@nextcloud.com>
Fri, 23 Sep 2022 09:19:38 +0000 (11:19 +0200)
committerVincent Petry <vincent@nextcloud.com>
Fri, 23 Sep 2022 09:19:38 +0000 (11:19 +0200)
Fix the route for loading the custom background.
Because the controller is UserThemeController, so the route path is
not "theming" but "userTheme".

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
apps/theming/lib/Themes/DefaultTheme.php

index 0fe1e8ff6910631f8fc2f78b57af93d5c994dea6..145461a901a385e950bfc4bd40804b5f2f629b82 100644 (file)
@@ -245,7 +245,7 @@ class DefaultTheme implements ITheme {
                        $themingBackground = $this->config->getUserValue($user->getUID(), Application::APP_ID, 'background', 'default');
 
                        if ($themingBackground === 'custom') {
-                               $variables['--image-main-background'] = "url('" . $this->urlGenerator->linkToRouteAbsolute('theming.theming.getBackground') . "')";
+                               $variables['--image-main-background'] = "url('" . $this->urlGenerator->linkToRouteAbsolute('theming.userTheme.getBackground') . "')";
                        } elseif ($themingBackground !== 'default' && substr($themingBackground, 0, 1) !== '#') {
                                $variables['--image-main-background'] = "url('" . $this->urlGenerator->linkTo(Application::APP_ID, "/img/background/$themingBackground") . "')";
                        }