diff options
author | Simon L <szaimen@e.mail.de> | 2023-06-16 13:05:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-16 13:05:45 +0200 |
commit | b288d27c51187535bf11b7edc380f206f3d8392c (patch) | |
tree | 13ee9716a070a3be0e67820ffe052bb4e98d211b | |
parent | 7afcc44827333683dc104cc9701963151d22946a (diff) | |
parent | 734b8c26dbbd043366275f0e5a90fdd8aef9f915 (diff) | |
download | nextcloud-server-b288d27c51187535bf11b7edc380f206f3d8392c.tar.gz nextcloud-server-b288d27c51187535bf11b7edc380f206f3d8392c.zip |
Merge pull request #38823 from nextcloud/enh/noid/fix-icons
generate user themed favicon and touchicon
-rw-r--r-- | apps/theming/lib/Controller/IconController.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/theming/lib/Controller/IconController.php b/apps/theming/lib/Controller/IconController.php index 08ee71ac660..1b16293a7f3 100644 --- a/apps/theming/lib/Controller/IconController.php +++ b/apps/theming/lib/Controller/IconController.php @@ -120,14 +120,15 @@ class IconController extends Controller { } catch (NotFoundException $e) { } if ($iconFile === null && $this->imageManager->shouldReplaceIcons()) { + $color = $this->themingDefaults->getColorPrimary(); try { - $iconFile = $this->imageManager->getCachedImage('favIcon-' . $app); + $iconFile = $this->imageManager->getCachedImage('favIcon-' . $app . $color); } catch (NotFoundException $exception) { $icon = $this->iconBuilder->getFavicon($app); if ($icon === false || $icon === '') { return new NotFoundResponse(); } - $iconFile = $this->imageManager->setCachedImage('favIcon-' . $app, $icon); + $iconFile = $this->imageManager->setCachedImage('favIcon-' . $app . $color, $icon); } $response = new FileDisplayResponse($iconFile, Http::STATUS_OK, ['Content-Type' => 'image/x-icon']); } @@ -157,14 +158,15 @@ class IconController extends Controller { } catch (NotFoundException $e) { } if ($this->imageManager->shouldReplaceIcons()) { + $color = $this->themingDefaults->getColorPrimary(); try { - $iconFile = $this->imageManager->getCachedImage('touchIcon-' . $app); + $iconFile = $this->imageManager->getCachedImage('touchIcon-' . $app . $color); } catch (NotFoundException $exception) { $icon = $this->iconBuilder->getTouchIcon($app); if ($icon === false || $icon === '') { return new NotFoundResponse(); } - $iconFile = $this->imageManager->setCachedImage('touchIcon-' . $app, $icon); + $iconFile = $this->imageManager->setCachedImage('touchIcon-' . $app . $color, $icon); } $response = new FileDisplayResponse($iconFile, Http::STATUS_OK, ['Content-Type' => 'image/png']); } |