From 3024f20270c9c6f978a4464f4d85d372939b4e6a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 19 Jul 2016 10:23:26 +0200 Subject: [PATCH] Fix maintenance mode When the server is in maintenance mode, apps are not loaded. That means apps/theming/ is not in the allowed paths. So we need to check without autoloading, whether the class exists. --- lib/private/server.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/server.php b/lib/private/server.php index 0731239e88421..4add27c8d072b 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -565,7 +565,7 @@ public function __construct($webRoot, \OC\Config $config) { return $factory->getManager(); }); $this->registerService('ThemingDefaults', function(Server $c) { - if($this->getConfig()->getSystemValue('installed', false) && $this->getAppManager()->isInstalled('theming')) { + if(class_exists('OCA\Theming\Template', false) && $this->getConfig()->getSystemValue('installed', false) && $this->getAppManager()->isInstalled('theming')) { return new Template( $this->getConfig(), $this->getL10N('theming'),