diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-01-09 23:11:49 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-01-10 13:23:22 +0100 |
commit | d4e106f2b34d4300ec743d3f6f7c8d9847c3e406 (patch) | |
tree | 3d8aef6327a538713f66b640a275b1ed70ec6c26 /apps/theming/lib/Util.php | |
parent | 9c017084e50a20591e3b5a5c2842101a540e7fb2 (diff) | |
download | nextcloud-server-d4e106f2b34d4300ec743d3f6f7c8d9847c3e406.tar.gz nextcloud-server-d4e106f2b34d4300ec743d3f6f7c8d9847c3e406.zip |
More detailed theming capabilities
This will allow clients to easily check if a custom background is used
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming/lib/Util.php')
-rw-r--r-- | apps/theming/lib/Util.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index 6a1aa672108..2f6f4128365 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -235,4 +235,16 @@ class Util { return false; } + public function isBackgroundThemed() { + $backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime',false); + + $backgroundExists = true; + try { + $this->appData->getFolder('images')->getFile('background'); + } catch (\Exception $e) { + $backgroundExists = false; + } + return $backgroundLogo && $backgroundLogo !== 'backgroundColor' && $backgroundExists; + } + } |