Force cache reset after PIP import
authorAlexander Ebert <ebert@woltlab.com>
Wed, 18 Oct 2017 10:12:34 +0000 (12:12 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 18 Oct 2017 10:12:34 +0000 (12:12 +0200)
wcfsetup/install/files/lib/data/package/installation/plugin/PackageInstallationPluginAction.class.php

index 7b19fca0fe0014d89876c983610ace589d19ecae..028a3683eaa70421c7a4870ec9435237774fd833 100644 (file)
@@ -13,6 +13,7 @@ use wcf\system\language\LanguageFactory;
 use wcf\system\package\plugin\OptionPackageInstallationPlugin;
 use wcf\system\package\SplitNodeException;
 use wcf\system\search\SearchIndexManager;
+use wcf\system\style\StyleHandler;
 use wcf\system\version\VersionTracker;
 use wcf\system\WCF;
 
@@ -123,9 +124,22 @@ class PackageInstallationPluginAction extends AbstractDatabaseObjectAction {
                        OptionEditor::resetCache();
                }
                
-               if ($this->packageInstallationPlugin->pluginName === 'language') {
-                       LanguageFactory::getInstance()->clearCache();
-                       LanguageFactory::getInstance()->deleteLanguageCache();
+               switch ($this->packageInstallationPlugin->pluginName) {
+                       case 'file':
+                               StyleHandler::resetStylesheets(false);
+                               break;
+                               
+                       case 'language':
+                               LanguageFactory::getInstance()->clearCache();
+                               LanguageFactory::getInstance()->deleteLanguageCache();
+                               break;
+                               
+                       case 'acpTemplate':
+                       case 'template':
+                       case 'templateListener':
+                               // resets the compiled templates
+                               LanguageFactory::getInstance()->deleteLanguageCache();
+                               break;
                }
                
                return [