Fixed import of language files
authorAlexander Ebert <ebert@woltlab.com>
Mon, 17 Jul 2017 11:33:02 +0000 (13:33 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 17 Jul 2017 11:48:07 +0000 (13:48 +0200)
See #2331

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

index 02f81a82bba66ffd8d2bc0d5106035080712a703..71a6bed1827d4f1771f38e0869190068998059f0 100644 (file)
@@ -8,6 +8,7 @@ use wcf\system\devtools\pip\DevtoolsPip;
 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\SplitNodeException;
 use wcf\system\search\SearchIndexManager;
 use wcf\system\version\VersionTracker;
@@ -116,6 +117,11 @@ class PackageInstallationPluginAction extends AbstractDatabaseObjectAction {
                
                CacheHandler::getInstance()->flushAll();
                
+               if ($this->packageInstallationPlugin->pluginName === 'language') {
+                       LanguageFactory::getInstance()->clearCache();
+                       LanguageFactory::getInstance()->deleteLanguageCache();
+               }
+               
                return [
                        'pluginName' => $this->packageInstallationPlugin->pluginName,
                        'target' => $this->parameters['target'],