From 1b24866a05604ca5f4bf70f030cd552e1fb0ff42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 26 May 2017 22:13:31 +0200 Subject: [PATCH] Do not use absolute urls in SCSS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/theming/lib/ThemingDefaults.php | 4 ++-- apps/theming/tests/ThemingDefaultsTest.php | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 2b3be1e641320..17c197bc802ad 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -196,8 +196,8 @@ public function getScssVariables() { '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 8646eaf865f80..32e0f5afaa3c0 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -524,18 +524,12 @@ public function testGetScssVariables() { ['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'