Fix installing language items of disabled language
authorMatthias Schmidt <gravatronics@live.com>
Tue, 20 Sep 2016 15:55:24 +0000 (17:55 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 20 Sep 2016 15:55:26 +0000 (17:55 +0200)
wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php

index e1f35452ceb0eb0d8940aa256bf667cfd04137bc..c52d2bb452b3bba55bc565fbf0f28ee8679f1054 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 namespace wcf\system\package\plugin;
+use wcf\data\language\Language;
 use wcf\data\language\LanguageEditor;
 use wcf\system\database\util\PreparedStatementConditionBuilder;
 use wcf\system\exception\SystemException;
-use wcf\system\language\LanguageFactory;
 use wcf\system\package\PackageArchive;
 use wcf\system\WCF;
 use wcf\util\XML;
@@ -120,8 +120,7 @@ class LanguagePackageInstallationPlugin extends AbstractXMLPackageInstallationPl
                        if ($languageFile !== null) {
                                if ($xml = $this->readLanguage($languageFile)) {
                                        // get language object
-                                       $language = LanguageFactory::getInstance()->getLanguageByCode($installedLanguage['languageCode']);
-                                       $languageEditor = new LanguageEditor($language);
+                                       $languageEditor = new LanguageEditor(new Language(null, $installedLanguage));
                                        
                                        // import xml
                                        // don't update language files if package is an application