Make sure we try to autoload the class
This commit is contained in:
parent
b42bce7439
commit
593608f25c
|
@ -567,7 +567,13 @@ 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'),
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
*/
|
||||
|
||||
namespace OC;
|
||||
use OC_Defaults;
|
||||
|
||||
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IConfig;
|
||||
use OCP\IURLGenerator;
|
||||
|
|
Loading…
Reference in New Issue