From: Alexander Ebert Date: Tue, 27 Sep 2011 13:20:03 +0000 (+0200) Subject: I18nHandler now cleans up language cache and compiled templates X-Git-Tag: 2.0.0_Beta_1~1766 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e6c6346d4f448d8ccb671474f73ac8b114667034;p=GitHub%2FWoltLab%2FWCF.git I18nHandler now cleans up language cache and compiled templates Closes #195 --- diff --git a/wcfsetup/install/files/lib/system/language/I18nHandler.class.php b/wcfsetup/install/files/lib/system/language/I18nHandler.class.php index 7b2ce6b969..41f0b5b366 100644 --- a/wcfsetup/install/files/lib/system/language/I18nHandler.class.php +++ b/wcfsetup/install/files/lib/system/language/I18nHandler.class.php @@ -2,6 +2,7 @@ namespace wcf\system\language; use wcf\system\database\util\PreparedStatementConditionBuilder; use wcf\system\exception\SystemException; +use wcf\system\language\LanguageFactory; use wcf\system\SingletonFactory; use wcf\system\WCF; @@ -218,6 +219,9 @@ class I18nHandler extends SingletonFactory { )); } } + + // reset language cache + LanguageFactory::getInstance()->deleteLanguageCache(); } /** @@ -235,6 +239,9 @@ class I18nHandler extends SingletonFactory { $languageVariable, $packageID )); + + // reset language cache + LanguageFactory::getInstance()->deleteLanguageCache(); } /** diff --git a/wcfsetup/install/files/lib/system/language/LanguageFactory.class.php b/wcfsetup/install/files/lib/system/language/LanguageFactory.class.php index 7b4ea48460..66003cb68e 100644 --- a/wcfsetup/install/files/lib/system/language/LanguageFactory.class.php +++ b/wcfsetup/install/files/lib/system/language/LanguageFactory.class.php @@ -1,6 +1,7 @@ clearCache(); } + + /** + * Removes language cache and compiled templates. + */ + public function deleteLanguageCache() { + LanguageEditor::deleteLanguageFiles(); + LanguageEditor::deleteCompiledTemplates(); + } }