From ebaebf5a4c572437b897844006620f8daef4ba23 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 17 Jul 2012 00:20:19 +0200 Subject: [PATCH] Applications are now singletons --- wcfsetup/install/files/lib/system/WCF.class.php | 2 +- .../lib/system/application/AbstractApplication.class.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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() */ -- 2.20.1