summaryrefslogtreecommitdiffstats
path: root/lib/private/URLGenerator.php
diff options
context:
space:
mode:
authorJulius Haertl <jus@bitgrid.net>2016-08-11 23:29:53 +0200
committerJulius Haertl <jus@bitgrid.net>2016-11-18 10:23:22 +0100
commitda6285b84f175640622a020f2d9258cee86a3c14 (patch)
treed5466c08f0330bc443b72cf5dd181f36bf6ebc53 /lib/private/URLGenerator.php
parente5f8f28d04df4ca046c80fa10275f0341d9ea25c (diff)
downloadnextcloud-server-da6285b84f175640622a020f2d9258cee86a3c14.tar.gz
nextcloud-server-da6285b84f175640622a020f2d9258cee86a3c14.zip
Core: load favicon from theming app
Signed-off-by: Julius Haertl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/URLGenerator.php')
-rw-r--r--lib/private/URLGenerator.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php
index 93517dc9f7e..e730bf7aedd 100644
--- a/lib/private/URLGenerator.php
+++ b/lib/private/URLGenerator.php
@@ -157,7 +157,9 @@ class URLGenerator implements IURLGenerator {
// 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")) {