diff options
author | Michael Weimann <mail@michael-weimann.eu> | 2018-08-28 15:58:27 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-02 08:37:54 +0200 |
commit | d855c38e078f2cd0bec86d5a20fc2f448799433b (patch) | |
tree | 68f4adfc1ff3a97273fbc47e9584d922e70c4b61 /apps/theming | |
parent | 92049c3ceb4121c6e424e8ba902cc6ebc663c690 (diff) | |
download | nextcloud-server-d855c38e078f2cd0bec86d5a20fc2f448799433b.tar.gz nextcloud-server-d855c38e078f2cd0bec86d5a20fc2f448799433b.zip |
Moves the logo files to logo
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
Diffstat (limited to 'apps/theming')
-rw-r--r-- | apps/theming/lib/ImageManager.php | 7 | ||||
-rw-r--r-- | apps/theming/lib/ThemingDefaults.php | 8 | ||||
-rw-r--r-- | apps/theming/tests/ImageManagerTest.php | 6 | ||||
-rw-r--r-- | apps/theming/tests/ThemingDefaultsTest.php | 4 |
4 files changed, 13 insertions, 12 deletions
diff --git a/apps/theming/lib/ImageManager.php b/apps/theming/lib/ImageManager.php index 6a42c22aba5..46598673f14 100644 --- a/apps/theming/lib/ImageManager.php +++ b/apps/theming/lib/ImageManager.php @@ -80,12 +80,13 @@ class ImageManager { } switch ($key) { + case 'logo-blue': + // the blue logo is only available as svg + return $this->urlGenerator->getAbsoluteURL('svg/core/logo/logo/0082C9') . '?v=' . $cacheBusterCounter; case 'logo': case 'logoheader': case 'favicon': - return $this->urlGenerator->imagePath('core', 'logo.png') . '?v=' . $cacheBusterCounter; - case 'logo-blue': - return $this->urlGenerator->imagePath('core', 'logo-blue.png') . '?v=' . $cacheBusterCounter; + return $this->urlGenerator->imagePath('core', 'logo/logo.png') . '?v=' . $cacheBusterCounter; case 'background': return $this->urlGenerator->imagePath('core', 'background.png') . '?v=' . $cacheBusterCounter; } diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 5a14e8a7903..7a26b46516f 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -217,9 +217,9 @@ class ThemingDefaults extends \OC_Defaults { if(!$logo || !$logoExists) { if($useSvg) { - $logo = $this->urlGenerator->imagePath('core', 'logo.svg'); + $logo = $this->urlGenerator->imagePath('core', 'logo/logo.svg'); } else { - $logo = $this->urlGenerator->imagePath('core', 'logo.png'); + $logo = $this->urlGenerator->imagePath('core', 'logo/logo.png'); } return $logo . '?v=' . $cacheBusterCounter; } @@ -312,9 +312,9 @@ class ThemingDefaults extends \OC_Defaults { $primaryColor = $this->getColorPrimary(); $luminance = $this->util->calculateLuminance($primaryColor); if ($logoMime === '' & $luminance > 0.8) { - return $this->imageManager->getImageUrl('logo-blue'); + return $this->imageManager->getImageUrl('logo-blue', true); } else { - return $this->imageManager->getImageUrl('logo'); + return $this->imageManager->getImageUrl('logo', true); } } diff --git a/apps/theming/tests/ImageManagerTest.php b/apps/theming/tests/ImageManagerTest.php index 38f5fb04969..fc9eac7f143 100644 --- a/apps/theming/tests/ImageManagerTest.php +++ b/apps/theming/tests/ImageManagerTest.php @@ -144,9 +144,9 @@ class ImageManagerTest extends TestCase { ->willReturnOnConsecutiveCalls(0, false); $this->urlGenerator->expects($this->once()) ->method('imagePath') - ->with('core', 'logo.png') - ->willReturn('logo.png'); - $this->assertEquals('logo.png?v=0', $this->imageManager->getImageUrl('logo')); + ->with('core', 'logo/logo.png') + ->willReturn('logo/logo.png'); + $this->assertEquals('logo/logo.png?v=0', $this->imageManager->getImageUrl('logo')); } public function testGetImageUrlAbsolute() { diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index fc3a737c3c8..3da39fbbf2f 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -593,11 +593,11 @@ class ThemingDefaultsTest extends TestCase { } public function testGetLogoDefaultWithSvg() { - $this->getLogoHelper('logo.svg', true); + $this->getLogoHelper('logo/logo.svg', true); } public function testGetLogoDefaultWithoutSvg() { - $this->getLogoHelper('logo.png', false); + $this->getLogoHelper('logo/logo.png', false); } public function testGetLogoCustom() { |