summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/theming/css/theming.scss6
-rw-r--r--apps/theming/lib/ThemingDefaults.php10
-rw-r--r--apps/theming/tests/ThemingDefaultsTest.php3
3 files changed, 16 insertions, 3 deletions
diff --git a/apps/theming/css/theming.scss b/apps/theming/css/theming.scss
index f65e20fa9b7..6b0566039d2 100644
--- a/apps/theming/css/theming.scss
+++ b/apps/theming/css/theming.scss
@@ -192,3 +192,9 @@ input.primary,
border: 1px solid #ebebeb;
}
}
+
+@if ($has-legal-links == 'true') {
+ footer {
+ height: 92px;
+ }
+}
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index b61179b681e..00c47676bc8 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -142,11 +142,11 @@ class ThemingDefaults extends \OC_Defaults {
}
public function getImprintUrl() {
- return $this->config->getAppValue('theming', 'imprintUrl', '');
+ return (string)$this->config->getAppValue('theming', 'imprintUrl', '');
}
public function getPrivacyUrl() {
- return $this->config->getAppValue('theming', 'privacyUrl', '');
+ return (string)$this->config->getAppValue('theming', 'privacyUrl', '');
}
public function getShortFooter() {
@@ -287,6 +287,12 @@ class ThemingDefaults extends \OC_Defaults {
if ($this->config->getAppValue('theming', 'backgroundMime', null) === 'backgroundColor') {
$variables['image-login-plain'] = 'true';
}
+
+ $variables['has-legal-links'] = 'false';
+ if($this->getImprintUrl() !== '' || $this->getPrivacyUrl() !== '') {
+ $variables['has-legal-links'] = 'true';
+ }
+
$cache->set('getScssVariables', $variables);
return $variables;
}
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php
index 2cd415d98df..6894b002eb9 100644
--- a/apps/theming/tests/ThemingDefaultsTest.php
+++ b/apps/theming/tests/ThemingDefaultsTest.php
@@ -654,7 +654,8 @@ class ThemingDefaultsTest extends TestCase {
'theming-logoheader-mime' => '\'jpeg\'',
'theming-favicon-mime' => '\'jpeg\'',
'image-logoheader' => '\'custom-logoheader?v=0\'',
- 'image-favicon' => '\'custom-favicon?v=0\''
+ 'image-favicon' => '\'custom-favicon?v=0\'',
+ 'has-legal-links' => 'false'
];
$this->assertEquals($expected, $this->template->getScssVariables());
}