Fixed language version of menu box names
authorMarcel Werk <burntime@woltlab.com>
Mon, 5 Sep 2016 15:38:47 +0000 (17:38 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 5 Sep 2016 15:38:47 +0000 (17:38 +0200)
wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php

index f88cbb9e55107ea502fe94f3b56eff75230d1777..7bbd84c567d351adf197ef44afbd93ef96948aed 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 namespace wcf\system\package\plugin;
+use wcf\data\language\Language;
 use wcf\system\database\util\PreparedStatementConditionBuilder;
 use wcf\system\exception\SystemException;
 use wcf\system\language\LanguageFactory;
@@ -232,6 +233,10 @@ abstract class AbstractXMLPackageInstallationPlugin extends AbstractPackageInsta
                }
                
                if ($singleValueOnly) {
+                       if (isset($matchingValues[LanguageFactory::getInstance()->getDefaultLanguage()->languageCode])) {
+                               return $matchingValues[LanguageFactory::getInstance()->getDefaultLanguage()->languageCode];
+                       }
+                       
                        return array_shift($matchingValues);
                }