diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-06-09 21:12:37 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-06-09 21:12:37 +0200 |
commit | ae6e1fe1df6ef484642e4fc93544ae0ce6cdabc5 (patch) | |
tree | d97b758e39e18558fb85a9e2e43bd852079a482b /lib/private/URLGenerator.php | |
parent | 35eaae4209fb70369cb9383aaebecbfdfeb059b2 (diff) | |
download | nextcloud-server-ae6e1fe1df6ef484642e4fc93544ae0ce6cdabc5.tar.gz nextcloud-server-ae6e1fe1df6ef484642e4fc93544ae0ce6cdabc5.zip |
Theme image for favicon-fb.png
Fixes https://github.com/nextcloud/server/issues/5322
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/URLGenerator.php')
-rw-r--r-- | lib/private/URLGenerator.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php index d954153ab88..2387deb6100 100644 --- a/lib/private/URLGenerator.php +++ b/lib/private/URLGenerator.php @@ -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"; |