diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-09-23 14:21:49 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-11-02 14:55:34 +0100 |
commit | 32ac5e7af81eee5a53e24568d779f5fb6e30583d (patch) | |
tree | 679e3913e650084dd76ecafddef92b01ff07bc27 /apps/theming/lib | |
parent | c0c2362a3d04217f196cc72054b02e0152561f40 (diff) | |
download | nextcloud-server-32ac5e7af81eee5a53e24568d779f5fb6e30583d.tar.gz nextcloud-server-32ac5e7af81eee5a53e24568d779f5fb6e30583d.zip |
fix(theming): Make sure the footer is hidden if not content is rendered
Previously the footer was empty, but the backdrop was still shown.
This hides the footer if no text content was defined.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/theming/lib')
-rw-r--r-- | apps/theming/lib/ThemingDefaults.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 7f74539ed5d..1e55a1fb2f9 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -172,11 +172,16 @@ class ThemingDefaults extends \OC_Defaults { public function getShortFooter() { $slogan = $this->getSlogan(); $baseUrl = $this->getBaseUrl(); - if ($baseUrl !== '') { - $footer = '<a href="' . $baseUrl . '" target="_blank"' . - ' rel="noreferrer noopener" class="entity-name">' . $this->getEntity() . '</a>'; - } else { - $footer = '<span class="entity-name">' .$this->getEntity() . '</span>'; + $entity = $this->getEntity(); + $footer = ''; + + if ($entity !== '') { + if ($baseUrl !== '') { + $footer = '<a href="' . $baseUrl . '" target="_blank"' . + ' rel="noreferrer noopener" class="entity-name">' . $entity . '</a>'; + } else { + $footer = '<span class="entity-name">' .$entity . '</span>'; + } } $footer .= ($slogan !== '' ? ' – ' . $slogan : ''); |