]> source.dussan.org Git - nextcloud-server.git/commitdiff
Theme image for favicon-fb.png 5324/head
authorLukas Reschke <lukas@statuscode.ch>
Fri, 9 Jun 2017 19:12:37 +0000 (21:12 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Fri, 9 Jun 2017 19:13:56 +0000 (21:13 +0200)
Fixes https://github.com/nextcloud/server/issues/5322

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
lib/private/URLGenerator.php

index d954153ab882f9af1e67a5375675f3ba0d69d791..2387deb6100c4f589b0d5edbcb51e9462d133c88 100644 (file)
@@ -159,13 +159,17 @@ class URLGenerator implements IURLGenerator {
                // Check if the app is in the app folder
                $path = '';
                $themingEnabled = $this->config->getSystemValue('installed', false) && \OCP\App::isEnabled('theming') && \OC_App::isAppLoaded('theming');
-               if($themingEnabled && $image === "favicon.ico" && \OC::$server->getThemingDefaults()->shouldReplaceIcons()) {
+               if($themingEnabled && $image === 'favicon.ico' && \OC::$server->getThemingDefaults()->shouldReplaceIcons()) {
                        $cacheBusterValue = $this->config->getAppValue('theming', 'cachebuster', '0');
-                       if($app==="") { $app = "core"; }
+                       if($app === '') { $app = 'core'; }
                        $path = $this->linkToRoute('theming.Icon.getFavicon', [ 'app' => $app ]) . '?v='. $cacheBusterValue;
-               } elseif($themingEnabled && $image === "favicon-touch.png" && \OC::$server->getThemingDefaults()->shouldReplaceIcons()) {
+               } elseif($themingEnabled && $image === 'favicon-touch.png' && \OC::$server->getThemingDefaults()->shouldReplaceIcons()) {
                        $cacheBusterValue = $this->config->getAppValue('theming', 'cachebuster', '0');
-                       if($app==="") { $app = "core"; }
+                       if($app === '') { $app = 'core'; }
+                       $path = $this->linkToRoute('theming.Icon.getTouchIcon', [ 'app' => $app ]) . '?v='. $cacheBusterValue;
+               } elseif($themingEnabled && $image === 'favicon-fb.png' && \OC::$server->getThemingDefaults()->shouldReplaceIcons()) {
+                       $cacheBusterValue = $this->config->getAppValue('theming', 'cachebuster', '0');
+                       if($app === '') { $app = 'core'; }
                        $path = $this->linkToRoute('theming.Icon.getTouchIcon', [ 'app' => $app ]) . '?v='. $cacheBusterValue;
                } elseif (file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$image")) {
                        $path = \OC::$WEBROOT . "/themes/$theme/apps/$app/img/$image";