Fix creation of new languge xml files
authorMatthias Schmidt <gravatronics@live.com>
Thu, 20 Jun 2019 08:11:14 +0000 (10:11 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 20 Jun 2019 08:11:14 +0000 (10:11 +0200)
See #2545
See #2815

wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php

index 94ca9043915e10ea259864d76670758591446b48..328777cfd29df3e3a24befa70cfdbfa0638547d4 100644 (file)
@@ -621,6 +621,7 @@ class LanguagePackageInstallationPlugin extends AbstractXMLPackageInstallationPl
         */
        protected function getEmptyXml($languageCode) {
                $xsdFilename = $this->getXsdFilename();
+               $apiVersion = WSC_API_VERSION;
                
                $language = LanguageFactory::getInstance()->getLanguageByCode($languageCode);
                if ($language === null) {
@@ -629,7 +630,7 @@ class LanguagePackageInstallationPlugin extends AbstractXMLPackageInstallationPl
                
                return <<<XML
 <?xml version="1.0" encoding="UTF-8"?>
-<language xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/" . WSC_API_VERSION . "/{$xsdFilename}.xsd" languagecode="{$language->languageCode}" languagename="{$language->languageName}" countrycode="{$language->countryCode}">
+<language xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/{$apiVersion}/{$xsdFilename}.xsd" languagecode="{$language->languageCode}" languagename="{$language->languageName}" countrycode="{$language->countryCode}">
 </language>
 XML;
        }