Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-05-09 16:52:41 +0300
committerArthur Schiwon <blizzz@arthur-schiwon.de>2018-05-09 16:52:41 +0300
commit62f1156a56a671cb593c0531922976914b1d4fa9 (patch)
tree7bc7e28895aee8e29bfc6d4ce7a19a1ee4bd64eb /apps/theming/lib/ThemingDefaults.php
parent57ea4624741c36ed6e68f60c672ddddbfece628a (diff)
allow to specify a link to a legal notice
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/theming/lib/ThemingDefaults.php')
-rw-r--r--apps/theming/lib/ThemingDefaults.php14
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;
}