Merge pull request #34212 from nextcloud/bugfix/34211/fix-getbackground-route

Fix loading custom background
This commit is contained in:
Vincent Petry 2022-09-23 15:05:47 +02:00 committed by GitHub
commit 15f0674a3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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