From ea8398f2da018445d760a140380dbb9ec14effa6 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 25 Nov 2015 16:09:40 +0100 Subject: [PATCH] Removed some DI references --- .../install/files/lib/system/WCFACP.class.php | 4 ++-- .../system/language/LanguageFactory.class.php | 20 ++----------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/wcfsetup/install/files/lib/system/WCFACP.class.php b/wcfsetup/install/files/lib/system/WCFACP.class.php index 109adac4e9..9513e839b6 100644 --- a/wcfsetup/install/files/lib/system/WCFACP.class.php +++ b/wcfsetup/install/files/lib/system/WCFACP.class.php @@ -116,10 +116,10 @@ class WCFACP extends WCF { * @see \wcf\system\WCF::initSession() */ protected function initSession() { - $factory = self::$diContainer->get(ACPSessionFactory::class); + $factory = new ACPSessionFactory(); $factory->load(); - self::$sessionObj = self::$diContainer->get(SessionHandler::class); + self::$sessionObj = SessionHandler::getInstance(); } /** diff --git a/wcfsetup/install/files/lib/system/language/LanguageFactory.class.php b/wcfsetup/install/files/lib/system/language/LanguageFactory.class.php index cd1eda6277..afeb514efd 100644 --- a/wcfsetup/install/files/lib/system/language/LanguageFactory.class.php +++ b/wcfsetup/install/files/lib/system/language/LanguageFactory.class.php @@ -25,11 +25,6 @@ class LanguageFactory extends SingletonFactory { */ protected $cache = null; - /** - * @var LanguageCacheBuilder - */ - protected $languageCacheBuilder; - /** * initialized languages * @var Language[] @@ -42,17 +37,6 @@ class LanguageFactory extends SingletonFactory { */ protected $scriptingCompiler = null; - /** - * LanguageFactory constructor. - * - * @param LanguageCacheBuilder $languageCacheBuilder - */ - public function __construct(LanguageCacheBuilder $languageCacheBuilder) { - $this->languageCacheBuilder = $languageCacheBuilder; - - parent::__construct(); - } - /** * @see SingletonFactory::init() */ @@ -232,7 +216,7 @@ class LanguageFactory extends SingletonFactory { */ protected function loadCache() { if (defined('WCF_N')) { - $this->cache = $this->languageCacheBuilder->getData(); + $this->cache = LanguageCacheBuilder::getInstance()->getData(); } } @@ -240,7 +224,7 @@ class LanguageFactory extends SingletonFactory { * Clears languages cache. */ public function clearCache() { - $this->languageCacheBuilder->reset(); + LanguageCacheBuilder::getInstance()->reset(); } /** -- 2.20.1