From 2dc89c0abf7326fc12dbd2478ebd5589b3bf2b11 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 8 Dec 2012 05:13:11 +0100 Subject: [PATCH] Fixes for WCF standalone --- wcfsetup/install/files/lib/system/WCF.class.php | 4 ++++ .../lib/system/application/ApplicationHandler.class.php | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index c68ea40b24..e9bb0d8372 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -419,6 +419,10 @@ class WCF { // register WCF as application self::$applications['wcf'] = ApplicationHandler::getInstance()->getWCF(); + if (PACKAGE_ID == 1) { + return; + } + // start main application $application = ApplicationHandler::getInstance()->getActiveApplication(); $loadedApplications[] = $this->loadApplication($application); diff --git a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php index 30140c6294..fc3c2755f7 100644 --- a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php +++ b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php @@ -93,7 +93,12 @@ class ApplicationHandler extends SingletonFactory { * @return wcf\data\application\Application */ public function getActiveApplication() { - return $this->cache['application'][PACKAGE_ID]; + // work-around during WCFSetup + if (isset($this->cache['application'][PACKAGE_ID])) { + return $this->cache['application'][PACKAGE_ID]; + } + + return $this->getWCF(); } /** -- 2.20.1