Skip to content

Commit

Permalink
Merge pull request #38291 from nextcloud/fix-loading-themed-logo
Browse files Browse the repository at this point in the history
fix loading custom logo image
  • Loading branch information
icewind1991 authored May 22, 2023
2 parents b313e2a + 51984dc commit 5479eb3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/theming/lib/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
}
Expand Down
6 changes: 3 additions & 3 deletions apps/theming/tests/IconBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions apps/theming/tests/UtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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);
Expand Down

0 comments on commit 5479eb3

Please sign in to comment.