diff --git a/components/ILIAS/Export/classes/ExportHandler/Info/Export/Component/Handler.php b/components/ILIAS/Export/classes/ExportHandler/Info/Export/Component/Handler.php index a56950dec020..b08a3d3af062 100644 --- a/components/ILIAS/Export/classes/ExportHandler/Info/Export/Component/Handler.php +++ b/components/ILIAS/Export/classes/ExportHandler/Info/Export/Component/Handler.php @@ -58,8 +58,9 @@ protected function init(): void $this->sv['xsd_file'] ??= ''; } - public function withExportTarget(ilExportHandlerTargetInterface $export_target): ilExportHandlerExportComponentInfoInterface - { + public function withExportTarget( + ilExportHandlerTargetInterface $export_target + ): ilExportHandlerExportComponentInfoInterface { $clone = clone $this; $clone->export_target = $export_target; $clone->init(); diff --git a/components/ILIAS/Export/classes/class.ilXmlExporter.php b/components/ILIAS/Export/classes/class.ilXmlExporter.php index 0dc8c854000d..6af0fef86a31 100755 --- a/components/ILIAS/Export/classes/class.ilXmlExporter.php +++ b/components/ILIAS/Export/classes/class.ilXmlExporter.php @@ -124,16 +124,17 @@ final public function determineSchemaVersion( string $a_target_release ): array { $svs = $this->getValidSchemaVersions($a_entity); - $found = false; $rsv = []; foreach ($svs as $k => $sv) { - if (!$found) { - if (version_compare($sv["min"], ILIAS_VERSION_NUMERIC, "<=") - && ($sv["max"] == "" || version_compare($sv["max"], ILIAS_VERSION_NUMERIC, ">="))) { - $rsv = $sv; - $rsv["schema_version"] = $k; - $found = true; - } + $min_version = $sv["min"] ?? ""; + $max_version = $sv["max"] ?? ""; + if ( + ($min_version === "" || version_compare($min_version, ILIAS_VERSION_NUMERIC, "<=")) && + ($max_version === "" || version_compare($max_version, ILIAS_VERSION_NUMERIC, ">=")) + ) { + $rsv = $sv; + $rsv["schema_version"] = $k; + break; } } return $rsv; diff --git a/components/ILIAS/Style/classes/class.ilStyleExporter.php b/components/ILIAS/Style/classes/class.ilStyleExporter.php index 6dc63143bef0..3aee9506dbff 100755 --- a/components/ILIAS/Style/classes/class.ilStyleExporter.php +++ b/components/ILIAS/Style/classes/class.ilStyleExporter.php @@ -46,7 +46,8 @@ public function getValidSchemaVersions(string $a_entity): array "namespace" => "http://www.ilias.de/Services/Style/10_0", "xsd_file" => "ilias_style_10.xsd", "uses_dataset" => true, - "min" => "10.0"), + "min" => "10.0", + "max" => "10.99"), "8.0" => array( "namespace" => "http://www.ilias.de/Services/Style/8", "xsd_file" => "ilias_style_8.xsd",