Skip to content

Commit

Permalink
Core: load favicon from theming app
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Haertl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Nov 18, 2016
1 parent e5f8f28 commit da6285b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/private/URLGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ public function imagePath($app, $image) {

// Check if the app is in the app folder
$path = '';
if (file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$image")) {
if(\OCP\App::isEnabled('theming') && $image === "favicon.ico" && $app !== "") {
$path = $this->linkToRoute('theming.Icon.getFavicon', [ 'app' => $app ]);
} elseif (file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$image")) {
$path = \OC::$WEBROOT . "/themes/$theme/apps/$app/img/$image";
} elseif (!file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$basename.svg")
&& file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$basename.png")) {
Expand Down

0 comments on commit da6285b

Please sign in to comment.