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.
This commit is contained in:
Joas Schilling 2016-07-19 10:23:26 +02:00
parent d35d9d246e
commit 3024f20270
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 1 additions and 1 deletions

View File

@ -565,7 +565,7 @@ class Server extends ServerContainer implements IServerContainer {
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'),