aboutsummaryrefslogtreecommitdiffstats
path: root/themes
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-09-23 14:21:49 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2023-11-02 14:55:34 +0100
commit32ac5e7af81eee5a53e24568d779f5fb6e30583d (patch)
tree679e3913e650084dd76ecafddef92b01ff07bc27 /themes
parentc0c2362a3d04217f196cc72054b02e0152561f40 (diff)
downloadnextcloud-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 'themes')
-rw-r--r--themes/example/defaults.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/themes/example/defaults.php b/themes/example/defaults.php
index a1c749c46c9..7ed7a2766e4 100644
--- a/themes/example/defaults.php
+++ b/themes/example/defaults.php
@@ -81,8 +81,16 @@ class OC_Theme {
* @return string short footer
*/
public function getShortFooter(): string {
- $footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' .
- '<br/>' . $this->getSlogan();
+ $entity = $this->getEntity();
+
+ $footer = '© ' . date('Y');
+
+ // Add link if entity name is not empty
+ if ($entity !== '') {
+ $footer .= ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $entity . '</a>' . '<br/>';
+ }
+
+ $footer .= $this->getSlogan();
return $footer;
}