diff options
Diffstat (limited to 'apps/theming/lib/ThemingDefaults.php')
-rw-r--r-- | apps/theming/lib/ThemingDefaults.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 2e6b667b1f6..d2f57471242 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -141,12 +141,26 @@ class ThemingDefaults extends \OC_Defaults { return \OCP\Util::sanitizeHTML($this->config->getAppValue('theming', 'slogan', $this->slogan)); } + public function getImprintUrl() { + return $this->config->getAppValue('theming', 'imprintUrl', ''); + } + public function getShortFooter() { $slogan = $this->getSlogan(); $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . ' rel="noreferrer noopener">' .$this->getEntity() . '</a>'. ($slogan !== '' ? ' – ' . $slogan : ''); + $imprintUrl = (string)$this->getImprintUrl(); + if($imprintUrl !== '' + && filter_var($imprintUrl, FILTER_VALIDATE_URL, [ + 'flags' => FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED + ]) + ) { + $footer .= '<br/><a href="' . $imprintUrl . '" class="legal" target="_blank"' . + ' rel="noreferrer noopener">' . $this->l->t('Legal notice') . '</a>'; + } + return $footer; } |