From 51984dc27319c627733ef0dcea11faa65fd63541 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 15 May 2023 17:38:43 +0200 Subject: [PATCH] fix loading custom logo image Signed-off-by: Robin Appelman --- apps/theming/lib/Util.php | 2 +- apps/theming/tests/IconBuilderTest.php | 6 +++--- apps/theming/tests/UtilTest.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index 789da394567e0..635c002611221 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -190,7 +190,7 @@ public function getAppIcon($app) { if ($this->config->getAppValue('theming', 'logoMime', '') !== '') { $logoFile = null; try { - $folder = $this->appData->getFolder('images'); + $folder = $this->appData->getFolder('global/images'); return $folder->getFile('logo'); } catch (NotFoundException $e) { } diff --git a/apps/theming/tests/IconBuilderTest.php b/apps/theming/tests/IconBuilderTest.php index 6edd6a05525bf..5637ce25cb698 100644 --- a/apps/theming/tests/IconBuilderTest.php +++ b/apps/theming/tests/IconBuilderTest.php @@ -103,7 +103,7 @@ public function testRenderAppIcon($app, $color, $file) { ->willReturn($color); $this->appData->expects($this->once()) ->method('getFolder') - ->with('images') + ->with('global/images') ->willThrowException(new NotFoundException()); $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). "/data/" . $file); @@ -132,7 +132,7 @@ public function testGetTouchIcon($app, $color, $file) { ->willReturn($color); $this->appData->expects($this->once()) ->method('getFolder') - ->with('images') + ->with('global/images') ->willThrowException(new NotFoundException()); $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). "/data/" . $file); @@ -165,7 +165,7 @@ public function testGetFavicon($app, $color, $file) { ->willReturn($color); $this->appData->expects($this->once()) ->method('getFolder') - ->with('images') + ->with('global/images') ->willThrowException(new NotFoundException()); $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). "/data/" . $file); diff --git a/apps/theming/tests/UtilTest.php b/apps/theming/tests/UtilTest.php index 137038acb98dc..febf6c0a79e29 100644 --- a/apps/theming/tests/UtilTest.php +++ b/apps/theming/tests/UtilTest.php @@ -153,7 +153,7 @@ public function testGenerateRadioButtonBlack() { public function testGetAppIcon($app, $expected) { $this->appData->expects($this->any()) ->method('getFolder') - ->with('images') + ->with('global/images') ->willThrowException(new NotFoundException()); $this->appManager->expects($this->once()) ->method('getAppPath') @@ -180,7 +180,7 @@ public function testGetAppIconThemed() { ->willReturn($file); $this->appData->expects($this->once()) ->method('getFolder') - ->with('images') + ->with('global/images') ->willReturn($folder); $icon = $this->util->getAppIcon('noapplikethis'); $this->assertEquals($file, $icon);