Merge pull request #2212 from nextcloud/fix_web_installer

Do not trigger appconfig queries when we are not yet installed
This commit is contained in:
Morris Jobke 2016-11-21 13:57:48 +01:00 committed by GitHub
commit 3d9077ae3a
1 changed files with 3 additions and 2 deletions

View File

@ -158,11 +158,12 @@ class URLGenerator implements IURLGenerator {
// Check if the app is in the app folder
$path = '';
if(\OCP\App::isEnabled('theming') && $image === "favicon.ico" && \OC::$server->getThemingDefaults()->shouldReplaceIcons()) {
$themingEnabled = $this->config->getSystemValue('installed', false) && \OCP\App::isEnabled('theming');
if($themingEnabled && $image === "favicon.ico" && \OC::$server->getThemingDefaults()->shouldReplaceIcons()) {
$cacheBusterValue = $this->config->getAppValue('theming', 'cachebuster', '0');
if($app==="") { $app = "core"; }
$path = $this->linkToRoute('theming.Icon.getFavicon', [ 'app' => $app ]) . '?v='. $cacheBusterValue;
} elseif(\OCP\App::isEnabled('theming') && $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"; }
$path = $this->linkToRoute('theming.Icon.getTouchIcon', [ 'app' => $app ]) . '?v='. $cacheBusterValue;