Fix loading custom background

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>
This commit is contained in:
Vincent Petry 2022-09-23 11:19:38 +02:00
parent ac1c7397a1
commit b8dbbb177d
No known key found for this signature in database
GPG key ID: E055D6A4D513575C

View 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") . "')";
}