Skip to content

Commit

Permalink
Merge pull request #46211 from nextcloud/fix/capabilities-stable29
Browse files Browse the repository at this point in the history
[stable29] fix(theming): Also provide default image as background by absolut URL
  • Loading branch information
susnux authored Jul 10, 2024
2 parents 3b7172b + 83c5b92 commit 4bbe234
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/theming/lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ public function getCapabilities() {
}
$colorText = $this->util->invertTextColor($color) ? '#000000' : '#ffffff';

$backgroundImage = $this->config->getUserValue($user->getUID(), Application::APP_ID, 'background_image', BackgroundService::BACKGROUND_DEFAULT);
$backgroundImage = $this->config->getUserValue($user->getUID(), Application::APP_ID, 'background_image', BackgroundService::DEFAULT_BACKGROUND_IMAGE);
if ($backgroundImage === BackgroundService::BACKGROUND_CUSTOM) {
$backgroundPlain = false;
$background = $this->url->linkToRouteAbsolute('theming.userTheme.getBackground');
} elseif (isset(BackgroundService::SHIPPED_BACKGROUNDS[$backgroundImage])) {
$backgroundPlain = false;
$background = $this->url->linkTo(Application::APP_ID, "img/background/$backgroundImage");
} elseif ($backgroundImage !== BackgroundService::BACKGROUND_DEFAULT) {
$background = $this->url->getAbsoluteURL($this->url->linkTo(Application::APP_ID, "img/background/$backgroundImage"));
} else {
$backgroundPlain = true;
$background = $color;
}
Expand Down

0 comments on commit 4bbe234

Please sign in to comment.