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
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/theming/lib/ImageManager.php7
-rw-r--r--apps/theming/lib/ThemingDefaults.php8
-rw-r--r--apps/theming/tests/ImageManagerTest.php6
-rw-r--r--apps/theming/tests/ThemingDefaultsTest.php4
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() {