Reset option cache after invoking option PIP in developer tools
authorMatthias Schmidt <gravatronics@live.com>
Sat, 5 Aug 2017 04:52:46 +0000 (06:52 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 5 Aug 2017 04:52:46 +0000 (06:52 +0200)
See #2331

wcfsetup/install/files/lib/data/package/installation/plugin/PackageInstallationPluginAction.class.php

index 71a6bed1827d4f1771f38e0869190068998059f0..4d9323412a78dc4517ca0276a986600e3e5999b6 100644 (file)
@@ -2,6 +2,7 @@
 namespace wcf\data\package\installation\plugin;
 use wcf\data\devtools\project\DevtoolsProject;
 use wcf\data\AbstractDatabaseObjectAction;
+use wcf\data\option\OptionEditor;
 use wcf\system\cache\CacheHandler;
 use wcf\system\devtools\pip\DevtoolsPackageInstallationDispatcher;
 use wcf\system\devtools\pip\DevtoolsPip;
@@ -9,6 +10,7 @@ use wcf\system\devtools\pip\IIdempotentPackageInstallationPlugin;
 use wcf\system\exception\PermissionDeniedException;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\LanguageFactory;
+use wcf\system\package\plugin\OptionPackageInstallationPlugin;
 use wcf\system\package\SplitNodeException;
 use wcf\system\search\SearchIndexManager;
 use wcf\system\version\VersionTracker;
@@ -117,6 +119,10 @@ class PackageInstallationPluginAction extends AbstractDatabaseObjectAction {
                
                CacheHandler::getInstance()->flushAll();
                
+               if ($pip instanceof OptionPackageInstallationPlugin) {
+                       OptionEditor::resetCache();
+               }
+               
                if ($this->packageInstallationPlugin->pluginName === 'language') {
                        LanguageFactory::getInstance()->clearCache();
                        LanguageFactory::getInstance()->deleteLanguageCache();