Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(theming): Also provide default image as background by absolut URL
There was a regression that for the default theme the image was not set as the background.
Also the background was not always an absolut URL, only for custom images it was absolut,
for default images / shipped images it was relative.

Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Jul 1, 2024
commit 83c5b9297a73df1d15ce9f41778b7aa84f797ef5
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