aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-07-22 16:49:33 +0200
committerJoas Schilling <coding@schilljs.com>2016-07-22 16:49:33 +0200
commit8cea95390dc2af3b50bb032571e29e29167dcfa5 (patch)
tree7af9fc4b0f98c2e801de263545dfca9e412b0c0c /lib/private/Server.php
parentdd1a5b9ac3171f6cf7098c8dfe495f47fca3b174 (diff)
downloadnextcloud-server-8cea95390dc2af3b50bb032571e29e29167dcfa5.tar.gz
nextcloud-server-8cea95390dc2af3b50bb032571e29e29167dcfa5.zip
Make sure we try to autoload the class
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index de2970d9bfa..76d6bbad1ef 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -631,7 +631,14 @@ class Server extends ServerContainer implements IServerContainer {
return $factory->getManager();
});
$this->registerService('ThemingDefaults', function(Server $c) {
- if(class_exists('OCA\Theming\Template', false) && $this->getConfig()->getSystemValue('installed', false) && $this->getAppManager()->isInstalled('theming')) {
+ try {
+ $classExists = class_exists('OCA\Theming\Template');
+ } catch (\OCP\AutoloadNotAllowedException $e) {
+ // App disabled or in maintenance mode
+ $classExists = false;
+ }
+
+ if ($classExists && $this->getConfig()->getSystemValue('installed', false) && $this->getAppManager()->isInstalled('theming')) {
return new Template(
$this->getConfig(),
$this->getL10N('theming'),