From: Alexander Ebert Date: Mon, 16 Jul 2012 22:20:19 +0000 (+0200) Subject: Applications are now singletons X-Git-Tag: 2.0.0_Beta_1~988 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ebaebf5a4c572437b897844006620f8daef4ba23;p=GitHub%2FWoltLab%2FWCF.git Applications are now singletons --- diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index b4ed98392d..256d16b949 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -434,7 +434,7 @@ class WCF { // start application if not within ACP if (!class_exists('wcf\system\WCFACP', false)) { - new $className(); + call_user_func(array($className, 'getInstance')); } } else { diff --git a/wcfsetup/install/files/lib/system/application/AbstractApplication.class.php b/wcfsetup/install/files/lib/system/application/AbstractApplication.class.php index c7a21eb7e3..dcb0e45ef5 100644 --- a/wcfsetup/install/files/lib/system/application/AbstractApplication.class.php +++ b/wcfsetup/install/files/lib/system/application/AbstractApplication.class.php @@ -1,17 +1,18 @@ * @package com.woltlab.wcf * @subpackage system.application * @category Community Framework */ -abstract class AbstractApplication implements IApplication { +abstract class AbstractApplication extends SingletonFactory implements IApplication { /** * @see wcf\system\application\IApplication::__callStatic() */