mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Revert "Dark autoloader magic for ThemingDefaults"
This reverts commit 4e1d501696.
This commit is contained in:
parent
d5dcf7aa39
commit
44dc839f7b
1 changed files with 4 additions and 10 deletions
|
|
@ -1199,16 +1199,10 @@ class Server extends ServerContainer implements IServerContainer {
|
|||
|
||||
$this->registerAlias(\OC_Defaults::class, 'ThemingDefaults');
|
||||
$this->registerService('ThemingDefaults', function (Server $c) {
|
||||
/*
|
||||
* Dark magic for autoloader.
|
||||
* If we do a class_exists it will try to load the class which will
|
||||
* make composer cache the result. Resulting in errors when enabling
|
||||
* the theming app.
|
||||
*/
|
||||
$prefixes = \OC::$composerAutoloader->getPrefixesPsr4();
|
||||
if (isset($prefixes['OCA\\Theming\\'])) {
|
||||
$classExists = true;
|
||||
} else {
|
||||
try {
|
||||
$classExists = class_exists('OCA\Theming\ThemingDefaults');
|
||||
} catch (\OCP\AutoloadNotAllowedException $e) {
|
||||
// App disabled or in maintenance mode
|
||||
$classExists = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue