]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make sure we try to autoload the class 548/head
authorJoas Schilling <coding@schilljs.com>
Fri, 22 Jul 2016 14:49:33 +0000 (16:49 +0200)
committerJoas Schilling <coding@schilljs.com>
Mon, 25 Jul 2016 07:42:28 +0000 (09:42 +0200)
lib/private/Server.php
lib/private/URLGenerator.php

index de2970d9bfadf1a72a1eade69edefe5a258ed694..76d6bbad1efff3945dd4b94f5bc3e83359c03f6b 100644 (file)
@@ -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'),
index 0f3c60b1323258b6cdf2b4ba46e1c95bd56a0a5b..93517dc9f7e9c75ec4d12ba6635323513f9be5df 100644 (file)
@@ -30,7 +30,8 @@
  */
 
 namespace OC;
-use OCP\Defaults;
+
+
 use OCP\ICacheFactory;
 use OCP\IConfig;
 use OCP\IURLGenerator;