From 558a0f89e2b272c155e4a1655c9e5b6cf18686e8 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 23 Jun 2021 09:33:25 +0200 Subject: [PATCH] Update XSD paths in XML files generated by PHP code See #4268 --- .../files/lib/data/language/LanguageEditor.class.php | 2 +- wcfsetup/install/files/lib/data/style/StyleEditor.class.php | 6 +++--- .../devtools/package/DevtoolsPackageXmlWriter.class.php | 2 +- .../devtools/pip/TXmlGuiPackageInstallationPlugin.class.php | 3 +-- .../plugin/LanguagePackageInstallationPlugin.class.php | 3 +-- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php index bb6bc07641..5184ef7a12 100644 --- a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php +++ b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php @@ -143,7 +143,7 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje echo "\xEF\xBB\xBF"; // header - echo "\nlanguageCode . "\" languagename=\"" . $this->languageName . "\" countrycode=\"" . $this->countryCode . "\">\n"; + echo "\nlanguageCode . "\" languagename=\"" . $this->languageName . "\" countrycode=\"" . $this->countryCode . "\">\n"; // get items $items = []; diff --git a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php index ae7a9b40af..a0c38dde9c 100644 --- a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php @@ -878,7 +878,7 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject $xml->beginDocument( 'style', 'http://www.woltlab.com', - 'http://www.woltlab.com/XSD/' . WSC_API_VERSION . '/style.xsd' + 'http://www.woltlab.com/XSD/5.4/style.xsd' ); // general block @@ -937,7 +937,7 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject $xml->beginDocument( 'variables', 'http://www.woltlab.com', - 'http://www.woltlab.com/XSD/' . WSC_API_VERSION . '/styleVariables.xsd' + 'http://www.woltlab.com/XSD/5.4/styleVariables.xsd' ); // get variables @@ -1071,7 +1071,7 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject $xml->beginDocument( 'package', 'http://www.woltlab.com', - 'http://www.woltlab.com/XSD/' . WSC_API_VERSION . '/package.xsd', + 'http://www.woltlab.com/XSD/5.4/package.xsd', ['name' => $packageName] ); diff --git a/wcfsetup/install/files/lib/system/devtools/package/DevtoolsPackageXmlWriter.class.php b/wcfsetup/install/files/lib/system/devtools/package/DevtoolsPackageXmlWriter.class.php index 4360c2763d..7ca02fba80 100644 --- a/wcfsetup/install/files/lib/system/devtools/package/DevtoolsPackageXmlWriter.class.php +++ b/wcfsetup/install/files/lib/system/devtools/package/DevtoolsPackageXmlWriter.class.php @@ -70,7 +70,7 @@ class DevtoolsPackageXmlWriter $this->xmlWriter->beginDocument( 'package', 'http://www.woltlab.com', - 'http://www.woltlab.com/XSD/' . WSC_API_VERSION . '/package.xsd', + 'http://www.woltlab.com/XSD/5.4/package.xsd', ['name' => $this->packageXmlData['packageIdentifier']] ); diff --git a/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php index f4b30c7dfe..ff0cd2b845 100644 --- a/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php @@ -397,11 +397,10 @@ trait TXmlGuiPackageInstallationPlugin protected function getEmptyXml() { $xsdFilename = $this->getXsdFilename(); - $apiVersion = WSC_API_VERSION; return << - + XML; diff --git a/wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php index 6b2bd45347..68f1ac70ea 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php @@ -638,7 +638,6 @@ class LanguagePackageInstallationPlugin extends AbstractXMLPackageInstallationPl protected function getEmptyXml($languageCode) { $xsdFilename = $this->getXsdFilename(); - $apiVersion = WSC_API_VERSION; $language = LanguageFactory::getInstance()->getLanguageByCode($languageCode); if ($language === null) { @@ -647,7 +646,7 @@ class LanguagePackageInstallationPlugin extends AbstractXMLPackageInstallationPl return << - + XML; } -- 2.20.1