diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/theming/css/theming.scss | 18 | ||||
-rw-r--r-- | apps/theming/lib/ThemingDefaults.php | 4 | ||||
-rw-r--r-- | apps/theming/tests/ThemingDefaultsTest.php | 10 |
3 files changed, 14 insertions, 18 deletions
diff --git a/apps/theming/css/theming.scss b/apps/theming/css/theming.scss index 63d466542e1..3cb8ee2584d 100644 --- a/apps/theming/css/theming.scss +++ b/apps/theming/css/theming.scss @@ -91,18 +91,20 @@ } /* override styles for login screen in guest.css */ -#header .logo { - background-image: url(#{$image-logo}); - @if $theming-logo-mime != '' { +@if variable_exists('theming-logo-mime') { + #header .logo { + background-image: url(#{$image-logo}); background-size: contain; } } -#body-login, -#firstrunwizard .firstrunwizard-header, -#theming-preview { - background-image: url(#{$image-login-background}); - background-color: $color-primary; +@if variable_exists('theming-background-mime') { + #body-login, + #firstrunwizard .firstrunwizard-header, + #theming-preview { + background-image: url(#{$image-login-background}); + background-color: $color-primary; + } } input.primary, diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 9dcc981817e..94abb4e288a 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -242,8 +242,8 @@ class ThemingDefaults extends \OC_Defaults { 'theming-background-mime' => "'" . $this->config->getAppValue('theming', 'backgroundMime', '') . "'" ]; - $variables['image-logo'] = "'".$this->urlGenerator->getAbsoluteURL($this->getLogo())."'"; - $variables['image-login-background'] = "'".$this->urlGenerator->getAbsoluteURL($this->getBackground())."'"; + $variables['image-logo'] = "'".$this->getLogo()."'"; + $variables['image-login-background'] = "'".$this->getBackground()."'"; $variables['image-login-plain'] = 'false'; if ($this->config->getAppValue('theming', 'color', null) !== null) { diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index d0dc6587f74..1a4679a2993 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -517,18 +517,12 @@ class ThemingDefaultsTest extends TestCase { ['theming.Theming.getLoginBackground', [], 'custom-background'], ]); - $this->urlGenerator->expects($this->exactly(2)) - ->method('getAbsoluteURL') - ->willReturnCallback(function ($path) { - return 'absolute-' . $path; - }); - $expected = [ 'theming-cachebuster' => '\'0\'', 'theming-logo-mime' => '\'jpeg\'', 'theming-background-mime' => '\'jpeg\'', - 'image-logo' => "'absolute-custom-logo?v=0'", - 'image-login-background' => "'absolute-custom-background?v=0'", + 'image-logo' => "'custom-logo?v=0'", + 'image-login-background' => "'custom-background?v=0'", 'color-primary' => $this->defaults->getColorPrimary(), 'color-primary-text' => '#ffffff', 'image-login-plain' => 'false', |