Fixed application not be initialized in ACP
authorAlexander Ebert <ebert@woltlab.com>
Thu, 22 Dec 2011 16:22:33 +0000 (17:22 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 22 Dec 2011 16:22:33 +0000 (17:22 +0100)
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
wcfsetup/install/files/lib/system/WCFACP.class.php

index 83e61d027a93ceae4e129fa7209bb031efb5db2c..51c85a0d11440ece0da295a14c25a04e90b6325b 100644 (file)
@@ -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]);
index 7b2c5a971a2c370418dfb2d15f12251bd2ad3c4f..e7ee86e88905c9d178846cc860ea2819058d89b1 100644 (file)
@@ -40,6 +40,7 @@ class WCFACP extends WCF {
                $this->initBlacklist();
                $this->initAuth();
                $this->initCoreObjects();
+               $this->initApplications();
        }
        
        /**