From e6c6346d4f448d8ccb671474f73ac8b114667034 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 27 Sep 2011 15:20:03 +0200 Subject: [PATCH] I18nHandler now cleans up language cache and compiled templates Closes #195 --- .../files/lib/system/language/I18nHandler.class.php | 7 +++++++ .../files/lib/system/language/LanguageFactory.class.php | 9 +++++++++ 2 files changed, 16 insertions(+) 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(); + } } -- 2.20.1