From 41a1f13a92eb85694c1bb9e28bef31437b358b14 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 11 Feb 2019 18:57:35 +0100 Subject: [PATCH] Add missing cache resets when using PIP GUI See #2545 --- .../event/listener/EventListenerEditor.class.php | 12 +++++++++++- .../listener/TemplateListenerEditor.class.php | 16 +++++++++++++++- .../TXmlGuiPackageInstallationPlugin.class.php | 4 ++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/data/event/listener/EventListenerEditor.class.php b/wcfsetup/install/files/lib/data/event/listener/EventListenerEditor.class.php index bdf4ed122c..bf48a23b8e 100644 --- a/wcfsetup/install/files/lib/data/event/listener/EventListenerEditor.class.php +++ b/wcfsetup/install/files/lib/data/event/listener/EventListenerEditor.class.php @@ -1,6 +1,8 @@ reset(); + } } diff --git a/wcfsetup/install/files/lib/data/template/listener/TemplateListenerEditor.class.php b/wcfsetup/install/files/lib/data/template/listener/TemplateListenerEditor.class.php index 6c01a438cb..a79a4d663f 100644 --- a/wcfsetup/install/files/lib/data/template/listener/TemplateListenerEditor.class.php +++ b/wcfsetup/install/files/lib/data/template/listener/TemplateListenerEditor.class.php @@ -1,6 +1,9 @@ reset(); + + // delete compiled templates + LanguageFactory::getInstance()->deleteLanguageCache(); + } } diff --git a/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php index 0e137d842c..4aa181e9e6 100644 --- a/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php @@ -219,6 +219,10 @@ trait TXmlGuiPackageInstallationPlugin { else { $xml->write($this->getXmlFileLocation($project)); } + + if (is_subclass_of($this->className, IEditableCachedObject::class)) { + call_user_func([$this->className, 'resetCache']); + } } /** -- 2.20.1