From cddc7e0913ec22347fdf26474bef90d9c87de383 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 22 Dec 2011 17:22:33 +0100 Subject: [PATCH] Fixed application not be initialized in ACP Please be aware the namespaces will be registered, but loadApplication() will *not* init the application if within ACP. Fixes #312 --- wcfsetup/install/files/lib/system/WCF.class.php | 6 ++++-- wcfsetup/install/files/lib/system/WCFACP.class.php | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index 83e61d027a..51c85a0d11 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -436,8 +436,10 @@ class WCF { throw new exception\SystemException('Unable to load configuration for '.$row['package']); } - // start application - new $className(); + // start application if not within ACP + if (!class_exists('wcf\system\WCFACP', false)) { + new $className(); + } } else { unset(self::$autoloadDirectories[$abbreviation]); diff --git a/wcfsetup/install/files/lib/system/WCFACP.class.php b/wcfsetup/install/files/lib/system/WCFACP.class.php index 7b2c5a971a..e7ee86e889 100644 --- a/wcfsetup/install/files/lib/system/WCFACP.class.php +++ b/wcfsetup/install/files/lib/system/WCFACP.class.php @@ -40,6 +40,7 @@ class WCFACP extends WCF { $this->initBlacklist(); $this->initAuth(); $this->initCoreObjects(); + $this->initApplications(); } /** -- 2.20.1