summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-02-10 09:18:38 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2023-03-27 12:56:52 +0200
commit44dc839f7b4c6196204deec58fb3e069c9f7b311 (patch)
tree2d1c060ae0b60153dbfb78faceb5f2d6605bea13
parentd5dcf7aa39140dff7cdc634a310e697a5766788f (diff)
downloadnextcloud-server-44dc839f7b4c6196204deec58fb3e069c9f7b311.tar.gz
nextcloud-server-44dc839f7b4c6196204deec58fb3e069c9f7b311.zip
Revert "Dark autoloader magic for ThemingDefaults"
This reverts commit 4e1d50169651f608e4728d72c07e463c62a39b87.
-rw-r--r--lib/private/Server.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index f1e96170886..92ef5d50513 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -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;
}