summaryrefslogtreecommitdiffstats
path: root/apps/theming/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/lib')
-rw-r--r--apps/theming/lib/Themes/CommonThemeTrait.php2
-rw-r--r--apps/theming/lib/Util.php16
2 files changed, 9 insertions, 9 deletions
diff --git a/apps/theming/lib/Themes/CommonThemeTrait.php b/apps/theming/lib/Themes/CommonThemeTrait.php
index 620c40199db..360c335fc7d 100644
--- a/apps/theming/lib/Themes/CommonThemeTrait.php
+++ b/apps/theming/lib/Themes/CommonThemeTrait.php
@@ -84,7 +84,7 @@ trait CommonThemeTrait {
protected function generateGlobalBackgroundVariables(): array {
$user = $this->userSession->getUser();
$backgroundDeleted = $this->config->getAppValue(Application::APP_ID, 'backgroundMime', '') === 'backgroundColor';
- $hasCustomLogoHeader = $this->imageManager->hasImage('logo') || $this->imageManager->hasImage('logoheader');
+ $hasCustomLogoHeader = $this->util->isLogoThemed();
$variables = [];
diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php
index 9a00bd1d5b1..5ae2910f73d 100644
--- a/apps/theming/lib/Util.php
+++ b/apps/theming/lib/Util.php
@@ -41,18 +41,13 @@ class Util {
private IConfig $config;
private IAppManager $appManager;
private IAppData $appData;
+ private ImageManager $imageManager;
- /**
- * Util constructor.
- *
- * @param IConfig $config
- * @param IAppManager $appManager
- * @param IAppData $appData
- */
- public function __construct(IConfig $config, IAppManager $appManager, IAppData $appData) {
+ public function __construct(IConfig $config, IAppManager $appManager, IAppData $appData, ImageManager $imageManager) {
$this->config = $config;
$this->appManager = $appManager;
$this->appData = $appData;
+ $this->imageManager = $imageManager;
}
/**
@@ -266,4 +261,9 @@ class Util {
$backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime', '');
return $backgroundLogo !== '' && $backgroundLogo !== 'backgroundColor';
}
+
+ public function isLogoThemed() {
+ return $this->imageManager->hasImage('logo')
+ || $this->imageManager->hasImage('logoheader');
+ }
}