Browse Source

Make sure we try to autoload the class

tags/v11.0RC2
Joas Schilling 7 years ago
parent
commit
8cea95390d
No account linked to committer's email address
2 changed files with 10 additions and 2 deletions
  1. 8
    1
      lib/private/Server.php
  2. 2
    1
      lib/private/URLGenerator.php

+ 8
- 1
lib/private/Server.php View 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'),

+ 2
- 1
lib/private/URLGenerator.php View File

@@ -30,7 +30,8 @@
*/

namespace OC;
use OCP\Defaults;


use OCP\ICacheFactory;
use OCP\IConfig;
use OCP\IURLGenerator;

Loading…
Cancel
Save