Fixes for WCF standalone
authorAlexander Ebert <ebert@woltlab.com>
Sat, 8 Dec 2012 04:13:11 +0000 (05:13 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 8 Dec 2012 04:13:11 +0000 (05:13 +0100)
wcfsetup/install/files/lib/system/WCF.class.php
wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php

index c68ea40b249b978ebce6fde968a4220a95722f06..e9bb0d8372d67aa82a20cb440dd69d88f0818eed 100644 (file)
@@ -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);
index 30140c629479b4a0747c7c86eda45356dabe837e..fc3c2755f7634dea8083e02140d1e36bfac2e13a 100644 (file)
@@ -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();
        }
        
        /**