diff options
author | Mārtiņš Tālbergs <martins.talbergs@zabbix.com> | 2021-03-04 14:18:46 +0300 |
---|---|---|
committer | Mārtiņš Tālbergs <martins.talbergs@zabbix.com> | 2021-03-04 14:18:46 +0300 |
commit | 1328acd704de23c5363a0c9fd5cff6cc96428485 (patch) | |
tree | 31d6dda06b96930e688bd12f8da98b3a7373c2e8 /ui | |
parent | 92ecf6b7b7bbf854816018e3f20c4da97530aa6a (diff) |
..F....... [ZBXNEXT-6288] deleted screens from all version validators and added "unset" in all version converters
Templated screens should still be validated and converted.
Diffstat (limited to 'ui')
18 files changed, 23 insertions, 355 deletions
diff --git a/ui/include/classes/import/converters/C10ImportConverter.php b/ui/include/classes/import/converters/C10ImportConverter.php index e9527201a2e..a537f5a8af3 100644 --- a/ui/include/classes/import/converters/C10ImportConverter.php +++ b/ui/include/classes/import/converters/C10ImportConverter.php @@ -56,7 +56,9 @@ class C10ImportConverter extends CConverter { $content = $this->convertSysmaps($content); - $content = $this->convertScreens($content); + if (array_key_exists('screens', $content)) { + unset($content['screens']); + } $content = $this->filterDuplicateGroups($content); $content = $this->filterDuplicateTriggers($content); @@ -872,41 +874,6 @@ class C10ImportConverter extends CConverter { } /** - * Convert screen elements. - * - * @param array $content - * - * @return array - */ - protected function convertScreens(array $content) { - if (!isset($content['screens']) || !$content['screens']) { - return $content; - } - - foreach ($content['screens'] as &$screen) { - $screen = CArrayHelper::renameKeys($screen, ['screenitems' => 'screen_items']); - - if (isset($screen['screen_items']) && $screen['screen_items']) { - foreach ($screen['screen_items'] as &$screenItem) { - $screenItem = CArrayHelper::renameKeys($screenItem, ['resourceid' => 'resource']); - - if (isset($screenItem['resource']) && $screenItem['resource'] !== '0') { - $screenItem['resource'] = CArrayHelper::renameKeys($screenItem['resource'], ['key_' => 'key']); - } - - $screenItem['sort_triggers'] = ''; - } - unset($screenItem); - - $screen['screen_items'] = array_values($screen['screen_items']); - } - } - unset($screen); - - return $content; - } - - /** * Merges all of the values from each element of $source stored in the $key property to the $key property of $target. * * @param array $source diff --git a/ui/include/classes/import/converters/C20ImportConverter.php b/ui/include/classes/import/converters/C20ImportConverter.php index 0b80d778870..d2ed58e6f2c 100644 --- a/ui/include/classes/import/converters/C20ImportConverter.php +++ b/ui/include/classes/import/converters/C20ImportConverter.php @@ -65,7 +65,7 @@ class C20ImportConverter extends CConverter { $data['zabbix_export']['triggers'] = $this->convertTriggers($data['zabbix_export']['triggers']); } if (array_key_exists('screens', $data['zabbix_export'])) { - $data['zabbix_export']['screens'] = $this->convertScreens($data['zabbix_export']['screens']); + unset($data['zabbix_export']['screens']); } if (array_key_exists('maps', $data['zabbix_export'])) { $data['zabbix_export']['maps'] = $this->convertMaps($data['zabbix_export']['maps']); diff --git a/ui/include/classes/import/converters/C30ImportConverter.php b/ui/include/classes/import/converters/C30ImportConverter.php index 8e44055e289..7b9ff08bb38 100644 --- a/ui/include/classes/import/converters/C30ImportConverter.php +++ b/ui/include/classes/import/converters/C30ImportConverter.php @@ -39,6 +39,9 @@ class C30ImportConverter extends CConverter { if (array_key_exists('maps', $data['zabbix_export'])) { $data['zabbix_export']['maps'] = $this->convertMaps($data['zabbix_export']['maps']); } + if (array_key_exists('screens', $data['zabbix_export'])) { + unset($data['zabbix_export']['screens']); + } return $data; } diff --git a/ui/include/classes/import/converters/C32ImportConverter.php b/ui/include/classes/import/converters/C32ImportConverter.php index d68d090488d..83ae57773c4 100644 --- a/ui/include/classes/import/converters/C32ImportConverter.php +++ b/ui/include/classes/import/converters/C32ImportConverter.php @@ -36,6 +36,9 @@ class C32ImportConverter extends CConverter { if (array_key_exists('maps', $data['zabbix_export'])) { $data['zabbix_export']['maps'] = $this->convertMaps($data['zabbix_export']['maps']); } + if (array_key_exists('screens', $data['zabbix_export'])) { + unset($data['zabbix_export']['screens']); + } return $data; } diff --git a/ui/include/classes/import/converters/C34ImportConverter.php b/ui/include/classes/import/converters/C34ImportConverter.php index ff31b74dd96..de6179daa0e 100644 --- a/ui/include/classes/import/converters/C34ImportConverter.php +++ b/ui/include/classes/import/converters/C34ImportConverter.php @@ -39,6 +39,10 @@ class C34ImportConverter extends CConverter { $data['zabbix_export']['maps'] = $this->convertMaps($data['zabbix_export']['maps']); } + if (array_key_exists('screens', $data['zabbix_export'])) { + unset($data['zabbix_export']['screens']); + } + return $data; } diff --git a/ui/include/classes/import/converters/C40ImportConverter.php b/ui/include/classes/import/converters/C40ImportConverter.php index a239dcbc36d..a65a50ff348 100644 --- a/ui/include/classes/import/converters/C40ImportConverter.php +++ b/ui/include/classes/import/converters/C40ImportConverter.php @@ -35,6 +35,10 @@ class C40ImportConverter extends CConverter { $data['zabbix_export']['templates'] = $this->convertHosts($data['zabbix_export']['templates']); } + if (array_key_exists('screens', $data['zabbix_export'])) { + unset($data['zabbix_export']['screens']); + } + return $data; } diff --git a/ui/include/classes/import/converters/C42ImportConverter.php b/ui/include/classes/import/converters/C42ImportConverter.php index 4fef70f1b82..4628590acd6 100644 --- a/ui/include/classes/import/converters/C42ImportConverter.php +++ b/ui/include/classes/import/converters/C42ImportConverter.php @@ -24,11 +24,6 @@ */ class C42ImportConverter extends CConverter { - /** - * Legacy screen resource types. - */ - private const SCREEN_RESOURCE_TYPE_SCREEN = 8; - public function convert($data) { $data['zabbix_export']['version'] = '4.4'; @@ -38,7 +33,7 @@ class C42ImportConverter extends CConverter { } if (array_key_exists('screens', $data['zabbix_export'])) { - $data['zabbix_export']['screens'] = $this->convertScreens($data['zabbix_export']['screens']); + unset($data['zabbix_export']['screens']); } $data['zabbix_export'] = $this->convertFormat($data['zabbix_export']); @@ -98,41 +93,6 @@ class C42ImportConverter extends CConverter { } /** - * Convert screens. - * - * @param array $screens - * - * @return array - */ - protected function convertScreens(array $screens) { - foreach ($screens as &$screen) { - if (array_key_exists('screen_items', $screen)) { - $screen['screen_items'] = $this->convertScreenItems($screen['screen_items']); - } - } - unset($screen); - - return $screens; - } - - /** - * Convert screen items. - * - * @param array $screen_items - * - * @return array - */ - protected function convertScreenItems(array $screen_items) { - foreach ($screen_items as $index => $screen_item) { - if ($screen_item['resourcetype'] == self::SCREEN_RESOURCE_TYPE_SCREEN) { - unset($screen_items[$index]); - } - } - - return $screen_items; - } - - /** * Update imported data array to format used starting from Zabbix version 4.4. * * @param array $data diff --git a/ui/include/classes/import/converters/C50ImportConverter.php b/ui/include/classes/import/converters/C50ImportConverter.php index 1813594644f..8cfd2eab398 100644 --- a/ui/include/classes/import/converters/C50ImportConverter.php +++ b/ui/include/classes/import/converters/C50ImportConverter.php @@ -42,6 +42,10 @@ class C50ImportConverter extends CConverter { $data['zabbix_export']['templates'] = self::convertTemplates($data['zabbix_export']['templates']); } + if (array_key_exists('screens', $data['zabbix_export'])) { + unset($data['zabbix_export']['screens']); + } + return $data; } diff --git a/ui/include/classes/import/validators/C10XmlValidator.php b/ui/include/classes/import/validators/C10XmlValidator.php index 7b3a2235286..f8641f82a8a 100644 --- a/ui/include/classes/import/validators/C10XmlValidator.php +++ b/ui/include/classes/import/validators/C10XmlValidator.php @@ -295,31 +295,6 @@ class C10XmlValidator extends CXmlValidatorGeneral { 'show_unack' => ['type' => XML_STRING | XML_REQUIRED] ]] ]], - 'screens' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen', 'rules' => [ - 'screen' => ['type' => XML_ARRAY, 'rules' => [ - 'name' => ['type' => XML_STRING | XML_REQUIRED], - 'hsize' => ['type' => XML_STRING | XML_REQUIRED], - 'vsize' => ['type' => XML_STRING | XML_REQUIRED], - 'screenitems' => ['type' => XML_INDEXED_ARRAY | XML_REQUIRED, 'prefix' => 'screenitem', 'rules' => [ - 'screenitem' => ['type' => XML_ARRAY, 'rules' => [ - 'resourcetype' => ['type' => XML_STRING | XML_REQUIRED], - 'resourceid' => ['type' => XML_REQUIRED], - 'width' => ['type' => XML_STRING | XML_REQUIRED], - 'height' => ['type' => XML_STRING | XML_REQUIRED], - 'x' => ['type' => XML_STRING | XML_REQUIRED], - 'y' => ['type' => XML_STRING | XML_REQUIRED], - 'colspan' => ['type' => XML_STRING | XML_REQUIRED], - 'rowspan' => ['type' => XML_STRING | XML_REQUIRED], - 'elements' => ['type' => XML_STRING | XML_REQUIRED], - 'valign' => ['type' => XML_STRING | XML_REQUIRED], - 'halign' => ['type' => XML_STRING | XML_REQUIRED], - 'style' => ['type' => XML_STRING | XML_REQUIRED], - 'dynamic' => ['type' => XML_STRING | XML_REQUIRED], - 'url' => ['type' => XML_STRING] - ]] - ]] - ]] - ]], 'images' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'image', 'rules' => [ 'image' => ['type' => XML_ARRAY, 'rules' => [ 'name' => ['type' => XML_STRING | XML_REQUIRED], diff --git a/ui/include/classes/import/validators/C20XmlValidator.php b/ui/include/classes/import/validators/C20XmlValidator.php index 6651092d1fb..8eb775004c5 100644 --- a/ui/include/classes/import/validators/C20XmlValidator.php +++ b/ui/include/classes/import/validators/C20XmlValidator.php @@ -667,34 +667,6 @@ class C20XmlValidator extends CXmlValidatorGeneral { ]] ]] ]], - 'screens' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen', 'rules' => [ - 'screen' => ['type' => XML_ARRAY, 'rules' => [ - 'name' => ['type' => XML_STRING | XML_REQUIRED], - 'hsize' => ['type' => XML_STRING | XML_REQUIRED], - 'vsize' => ['type' => XML_STRING | XML_REQUIRED], - 'screen_items' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen_item', 'rules' => [ - 'screen_item' => ['type' => XML_ARRAY, 'rules' => [ - 'resourcetype' => ['type' => XML_STRING | XML_REQUIRED], - 'resource' => ['type' => XML_REQUIRED, 'preprocessor' => [$this, 'transformZero2Array']], - 'width' => ['type' => XML_STRING | XML_REQUIRED], - 'height' => ['type' => XML_STRING | XML_REQUIRED], - 'x' => ['type' => XML_STRING | XML_REQUIRED], - 'y' => ['type' => XML_STRING | XML_REQUIRED], - 'colspan' => ['type' => XML_STRING | XML_REQUIRED], - 'rowspan' => ['type' => XML_STRING | XML_REQUIRED], - 'elements' => ['type' => XML_STRING | XML_REQUIRED], - 'valign' => ['type' => XML_STRING | XML_REQUIRED], - 'halign' => ['type' => XML_STRING | XML_REQUIRED], - 'style' => ['type' => XML_STRING | XML_REQUIRED], - 'dynamic' => ['type' => XML_STRING | XML_REQUIRED], - 'sort_triggers' => ['type' => XML_STRING | XML_REQUIRED], - 'url' => ['type' => XML_STRING], - 'application' => ['type' => XML_STRING], - 'max_columns' => ['type' => XML_STRING] - ]] - ]] - ]] - ]], 'images' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'image', 'rules' => [ 'image' => ['type' => XML_ARRAY, 'rules' => [ 'name' => ['type' => XML_STRING | XML_REQUIRED], diff --git a/ui/include/classes/import/validators/C30XmlValidator.php b/ui/include/classes/import/validators/C30XmlValidator.php index ae8c3149981..5b385ac5cfc 100644 --- a/ui/include/classes/import/validators/C30XmlValidator.php +++ b/ui/include/classes/import/validators/C30XmlValidator.php @@ -717,34 +717,6 @@ class C30XmlValidator extends CXmlValidatorGeneral { ]] ]] ]], - 'screens' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen', 'rules' => [ - 'screen' => ['type' => XML_ARRAY, 'rules' => [ - 'name' => ['type' => XML_STRING | XML_REQUIRED], - 'hsize' => ['type' => XML_STRING | XML_REQUIRED], - 'vsize' => ['type' => XML_STRING | XML_REQUIRED], - 'screen_items' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen_item', 'rules' => [ - 'screen_item' => ['type' => XML_ARRAY, 'rules' => [ - 'resourcetype' => ['type' => XML_STRING | XML_REQUIRED], - 'style' => ['type' => XML_STRING | XML_REQUIRED], - 'resource' => ['type' => XML_REQUIRED, 'preprocessor' => [$this, 'transformZero2Array']], - 'width' => ['type' => XML_STRING | XML_REQUIRED], - 'height' => ['type' => XML_STRING | XML_REQUIRED], - 'x' => ['type' => XML_STRING | XML_REQUIRED], - 'y' => ['type' => XML_STRING | XML_REQUIRED], - 'colspan' => ['type' => XML_STRING | XML_REQUIRED], - 'rowspan' => ['type' => XML_STRING | XML_REQUIRED], - 'elements' => ['type' => XML_STRING | XML_REQUIRED], - 'valign' => ['type' => XML_STRING | XML_REQUIRED], - 'halign' => ['type' => XML_STRING | XML_REQUIRED], - 'dynamic' => ['type' => XML_STRING | XML_REQUIRED], - 'sort_triggers' => ['type' => XML_STRING | XML_REQUIRED], - 'url' => ['type' => XML_STRING | XML_REQUIRED], - 'application' => ['type' => XML_STRING | XML_REQUIRED], - 'max_columns' => ['type' => XML_STRING | XML_REQUIRED] - ]] - ]] - ]] - ]], 'images' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'image', 'rules' => [ 'image' => ['type' => XML_ARRAY, 'rules' => [ 'name' => ['type' => XML_STRING | XML_REQUIRED], diff --git a/ui/include/classes/import/validators/C32XmlValidator.php b/ui/include/classes/import/validators/C32XmlValidator.php index a8057b0ff9e..eb6cc74c4a0 100644 --- a/ui/include/classes/import/validators/C32XmlValidator.php +++ b/ui/include/classes/import/validators/C32XmlValidator.php @@ -827,34 +827,6 @@ class C32XmlValidator extends CXmlValidatorGeneral { ]] ]] ]], - 'screens' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen', 'rules' => [ - 'screen' => ['type' => XML_ARRAY, 'rules' => [ - 'name' => ['type' => XML_STRING | XML_REQUIRED], - 'hsize' => ['type' => XML_STRING | XML_REQUIRED], - 'vsize' => ['type' => XML_STRING | XML_REQUIRED], - 'screen_items' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen_item', 'rules' => [ - 'screen_item' => ['type' => XML_ARRAY, 'rules' => [ - 'resourcetype' => ['type' => XML_STRING | XML_REQUIRED], - 'style' => ['type' => XML_STRING | XML_REQUIRED], - 'resource' => ['type' => XML_REQUIRED, 'preprocessor' => [$this, 'transformZero2Array']], - 'width' => ['type' => XML_STRING | XML_REQUIRED], - 'height' => ['type' => XML_STRING | XML_REQUIRED], - 'x' => ['type' => XML_STRING | XML_REQUIRED], - 'y' => ['type' => XML_STRING | XML_REQUIRED], - 'colspan' => ['type' => XML_STRING | XML_REQUIRED], - 'rowspan' => ['type' => XML_STRING | XML_REQUIRED], - 'elements' => ['type' => XML_STRING | XML_REQUIRED], - 'valign' => ['type' => XML_STRING | XML_REQUIRED], - 'halign' => ['type' => XML_STRING | XML_REQUIRED], - 'dynamic' => ['type' => XML_STRING | XML_REQUIRED], - 'sort_triggers' => ['type' => XML_STRING | XML_REQUIRED], - 'url' => ['type' => XML_STRING | XML_REQUIRED], - 'application' => ['type' => XML_STRING | XML_REQUIRED], - 'max_columns' => ['type' => XML_STRING | XML_REQUIRED] - ]] - ]] - ]] - ]], 'images' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'image', 'rules' => [ 'image' => ['type' => XML_ARRAY, 'rules' => [ 'name' => ['type' => XML_STRING | XML_REQUIRED], diff --git a/ui/include/classes/import/validators/C34XmlValidator.php b/ui/include/classes/import/validators/C34XmlValidator.php index 32d2889a5dc..21a8827cdfc 100644 --- a/ui/include/classes/import/validators/C34XmlValidator.php +++ b/ui/include/classes/import/validators/C34XmlValidator.php @@ -899,34 +899,6 @@ class C34XmlValidator extends CXmlValidatorGeneral { ]] ]] ]], - 'screens' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen', 'rules' => [ - 'screen' => ['type' => XML_ARRAY, 'rules' => [ - 'name' => ['type' => XML_STRING | XML_REQUIRED], - 'hsize' => ['type' => XML_STRING | XML_REQUIRED], - 'vsize' => ['type' => XML_STRING | XML_REQUIRED], - 'screen_items' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen_item', 'rules' => [ - 'screen_item' => ['type' => XML_ARRAY, 'rules' => [ - 'resourcetype' => ['type' => XML_STRING | XML_REQUIRED], - 'style' => ['type' => XML_STRING | XML_REQUIRED], - 'resource' => ['type' => XML_REQUIRED, 'preprocessor' => [$this, 'transformZero2Array']], - 'width' => ['type' => XML_STRING | XML_REQUIRED], - 'height' => ['type' => XML_STRING | XML_REQUIRED], - 'x' => ['type' => XML_STRING | XML_REQUIRED], - 'y' => ['type' => XML_STRING | XML_REQUIRED], - 'colspan' => ['type' => XML_STRING | XML_REQUIRED], - 'rowspan' => ['type' => XML_STRING | XML_REQUIRED], - 'elements' => ['type' => XML_STRING | XML_REQUIRED], - 'valign' => ['type' => XML_STRING | XML_REQUIRED], - 'halign' => ['type' => XML_STRING | XML_REQUIRED], - 'dynamic' => ['type' => XML_STRING | XML_REQUIRED], - 'sort_triggers' => ['type' => XML_STRING | XML_REQUIRED], - 'url' => ['type' => XML_STRING | XML_REQUIRED], - 'application' => ['type' => XML_STRING | XML_REQUIRED], - 'max_columns' => ['type' => XML_STRING | XML_REQUIRED] - ]] - ]] - ]] - ]], 'images' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'image', 'rules' => [ 'image' => ['type' => XML_ARRAY, 'rules' => [ 'name' => ['type' => XML_STRING | XML_REQUIRED], diff --git a/ui/include/classes/import/validators/C40XmlValidator.php b/ui/include/classes/import/validators/C40XmlValidator.php index 6b13ee4062b..567e0c4b091 100644 --- a/ui/include/classes/import/validators/C40XmlValidator.php +++ b/ui/include/classes/import/validators/C40XmlValidator.php @@ -1077,34 +1077,6 @@ class C40XmlValidator extends CXmlValidatorGeneral { ]] ]] ]], - 'screens' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen', 'rules' => [ - 'screen' => ['type' => XML_ARRAY, 'rules' => [ - 'name' => ['type' => XML_STRING | XML_REQUIRED], - 'hsize' => ['type' => XML_STRING | XML_REQUIRED], - 'vsize' => ['type' => XML_STRING | XML_REQUIRED], - 'screen_items' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen_item', 'rules' => [ - 'screen_item' => ['type' => XML_ARRAY, 'rules' => [ - 'resourcetype' => ['type' => XML_STRING | XML_REQUIRED], - 'style' => ['type' => XML_STRING | XML_REQUIRED], - 'resource' => ['type' => XML_REQUIRED, 'preprocessor' => [$this, 'transformZero2Array']], - 'width' => ['type' => XML_STRING | XML_REQUIRED], - 'height' => ['type' => XML_STRING | XML_REQUIRED], - 'x' => ['type' => XML_STRING | XML_REQUIRED], - 'y' => ['type' => XML_STRING | XML_REQUIRED], - 'colspan' => ['type' => XML_STRING | XML_REQUIRED], - 'rowspan' => ['type' => XML_STRING | XML_REQUIRED], - 'elements' => ['type' => XML_STRING | XML_REQUIRED], - 'valign' => ['type' => XML_STRING | XML_REQUIRED], - 'halign' => ['type' => XML_STRING | XML_REQUIRED], - 'dynamic' => ['type' => XML_STRING | XML_REQUIRED], - 'sort_triggers' => ['type' => XML_STRING | XML_REQUIRED], - 'url' => ['type' => XML_STRING | XML_REQUIRED], - 'application' => ['type' => XML_STRING | XML_REQUIRED], - 'max_columns' => ['type' => XML_STRING | XML_REQUIRED] - ]] - ]] - ]] - ]], 'images' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'image', 'rules' => [ 'image' => ['type' => XML_ARRAY, 'rules' => [ 'name' => ['type' => XML_STRING | XML_REQUIRED], diff --git a/ui/include/classes/import/validators/C42XmlValidator.php b/ui/include/classes/import/validators/C42XmlValidator.php index 024b538fc1b..e679f4482db 100644 --- a/ui/include/classes/import/validators/C42XmlValidator.php +++ b/ui/include/classes/import/validators/C42XmlValidator.php @@ -1133,34 +1133,6 @@ class C42XmlValidator extends CXmlValidatorGeneral { ]] ]] ]], - 'screens' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen', 'rules' => [ - 'screen' => ['type' => XML_ARRAY, 'rules' => [ - 'name' => ['type' => XML_STRING | XML_REQUIRED], - 'hsize' => ['type' => XML_STRING | XML_REQUIRED], - 'vsize' => ['type' => XML_STRING | XML_REQUIRED], - 'screen_items' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen_item', 'rules' => [ - 'screen_item' => ['type' => XML_ARRAY, 'rules' => [ - 'resourcetype' => ['type' => XML_STRING | XML_REQUIRED], - 'style' => ['type' => XML_STRING | XML_REQUIRED], - 'resource' => ['type' => XML_REQUIRED, 'preprocessor' => [$this, 'transformZero2Array']], - 'width' => ['type' => XML_STRING | XML_REQUIRED], - 'height' => ['type' => XML_STRING | XML_REQUIRED], - 'x' => ['type' => XML_STRING | XML_REQUIRED], - 'y' => ['type' => XML_STRING | XML_REQUIRED], - 'colspan' => ['type' => XML_STRING | XML_REQUIRED], - 'rowspan' => ['type' => XML_STRING | XML_REQUIRED], - 'elements' => ['type' => XML_STRING | XML_REQUIRED], - 'valign' => ['type' => XML_STRING | XML_REQUIRED], - 'halign' => ['type' => XML_STRING | XML_REQUIRED], - 'dynamic' => ['type' => XML_STRING | XML_REQUIRED], - 'sort_triggers' => ['type' => XML_STRING | XML_REQUIRED], - 'url' => ['type' => XML_STRING | XML_REQUIRED], - 'application' => ['type' => XML_STRING | XML_REQUIRED], - 'max_columns' => ['type' => XML_STRING | XML_REQUIRED] - ]] - ]] - ]] - ]], 'images' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'image', 'rules' => [ 'image' => ['type' => XML_ARRAY, 'rules' => [ 'name' => ['type' => XML_STRING | XML_REQUIRED], diff --git a/ui/include/classes/import/validators/C44XmlValidator.php b/ui/include/classes/import/validators/C44XmlValidator.php index e35340f47e7..2a6598d4c1f 100644 --- a/ui/include/classes/import/validators/C44XmlValidator.php +++ b/ui/include/classes/import/validators/C44XmlValidator.php @@ -1494,34 +1494,6 @@ class C44XmlValidator extends CXmlValidatorGeneral { ]] ]] ]], - 'screens' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen', 'rules' => [ - 'screen' => ['type' => XML_ARRAY, 'rules' => [ - 'name' => ['type' => XML_STRING | XML_REQUIRED], - 'hsize' => ['type' => XML_STRING | XML_REQUIRED], - 'vsize' => ['type' => XML_STRING | XML_REQUIRED], - 'screen_items' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen_item', 'rules' => [ - 'screen_item' => ['type' => XML_ARRAY, 'rules' => [ - 'resourcetype' => ['type' => XML_STRING | XML_REQUIRED], - 'style' => ['type' => XML_STRING | XML_REQUIRED], - 'resource' => ['type' => XML_REQUIRED, 'preprocessor' => [$this, 'transformZero2Array']], - 'width' => ['type' => XML_STRING | XML_REQUIRED], - 'height' => ['type' => XML_STRING | XML_REQUIRED], - 'x' => ['type' => XML_STRING | XML_REQUIRED], - 'y' => ['type' => XML_STRING | XML_REQUIRED], - 'colspan' => ['type' => XML_STRING | XML_REQUIRED], - 'rowspan' => ['type' => XML_STRING | XML_REQUIRED], - 'elements' => ['type' => XML_STRING | XML_REQUIRED], - 'valign' => ['type' => XML_STRING | XML_REQUIRED], - 'halign' => ['type' => XML_STRING | XML_REQUIRED], - 'dynamic' => ['type' => XML_STRING | XML_REQUIRED], - 'sort_triggers' => ['type' => XML_STRING | XML_REQUIRED], - 'url' => ['type' => XML_STRING | XML_REQUIRED], - 'application' => ['type' => XML_STRING | XML_REQUIRED], - 'max_columns' => ['type' => XML_STRING | XML_REQUIRED] - ]] - ]] - ]] - ]], 'images' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'image', 'rules' => [ 'image' => ['type' => XML_ARRAY, 'rules' => [ 'name' => ['type' => XML_STRING | XML_REQUIRED], diff --git a/ui/include/classes/import/validators/C50XmlValidator.php b/ui/include/classes/import/validators/C50XmlValidator.php index dba3155c555..89a4d862794 100644 --- a/ui/include/classes/import/validators/C50XmlValidator.php +++ b/ui/include/classes/import/validators/C50XmlValidator.php @@ -1629,34 +1629,6 @@ class C50XmlValidator extends CXmlValidatorGeneral { ]] ]] ]], - 'screens' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen', 'rules' => [ - 'screen' => ['type' => XML_ARRAY, 'rules' => [ - 'name' => ['type' => XML_STRING | XML_REQUIRED], - 'hsize' => ['type' => XML_STRING | XML_REQUIRED], - 'vsize' => ['type' => XML_STRING | XML_REQUIRED], - 'screen_items' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen_item', 'rules' => [ - 'screen_item' => ['type' => XML_ARRAY, 'rules' => [ - 'resourcetype' => ['type' => XML_STRING | XML_REQUIRED], - 'style' => ['type' => XML_STRING | XML_REQUIRED], - 'resource' => ['type' => XML_REQUIRED, 'preprocessor' => [$this, 'transformZero2Array']], - 'width' => ['type' => XML_STRING | XML_REQUIRED], - 'height' => ['type' => XML_STRING | XML_REQUIRED], - 'x' => ['type' => XML_STRING | XML_REQUIRED], - 'y' => ['type' => XML_STRING | XML_REQUIRED], - 'colspan' => ['type' => XML_STRING | XML_REQUIRED], - 'rowspan' => ['type' => XML_STRING | XML_REQUIRED], - 'elements' => ['type' => XML_STRING | XML_REQUIRED], - 'valign' => ['type' => XML_STRING | XML_REQUIRED], - 'halign' => ['type' => XML_STRING | XML_REQUIRED], - 'dynamic' => ['type' => XML_STRING | XML_REQUIRED], - 'sort_triggers' => ['type' => XML_STRING | XML_REQUIRED], - 'url' => ['type' => XML_STRING | XML_REQUIRED], - 'application' => ['type' => XML_STRING | XML_REQUIRED], - 'max_columns' => ['type' => XML_STRING | XML_REQUIRED] - ]] - ]] - ]] - ]], 'images' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'image', 'rules' => [ 'image' => ['type' => XML_ARRAY, 'rules' => [ 'name' => ['type' => XML_STRING | XML_REQUIRED], diff --git a/ui/include/classes/import/validators/C52XmlValidator.php b/ui/include/classes/import/validators/C52XmlValidator.php index 0b60d407975..78b43452b88 100644 --- a/ui/include/classes/import/validators/C52XmlValidator.php +++ b/ui/include/classes/import/validators/C52XmlValidator.php @@ -1763,34 +1763,6 @@ class C52XmlValidator extends CXmlValidatorGeneral { ]] ]] ]], - 'screens' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen', 'rules' => [ - 'screen' => ['type' => XML_ARRAY, 'rules' => [ - 'name' => ['type' => XML_STRING | XML_REQUIRED], - 'hsize' => ['type' => XML_STRING | XML_REQUIRED], - 'vsize' => ['type' => XML_STRING | XML_REQUIRED], - 'screen_items' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'screen_item', 'rules' => [ - 'screen_item' => ['type' => XML_ARRAY, 'rules' => [ - 'resourcetype' => ['type' => XML_STRING | XML_REQUIRED], - 'style' => ['type' => XML_STRING | XML_REQUIRED], - 'resource' => ['type' => XML_REQUIRED, 'preprocessor' => [$this, 'transformZero2Array']], - 'width' => ['type' => XML_STRING | XML_REQUIRED], - 'height' => ['type' => XML_STRING | XML_REQUIRED], - 'x' => ['type' => XML_STRING | XML_REQUIRED], - 'y' => ['type' => XML_STRING | XML_REQUIRED], - 'colspan' => ['type' => XML_STRING | XML_REQUIRED], - 'rowspan' => ['type' => XML_STRING | XML_REQUIRED], - 'elements' => ['type' => XML_STRING | XML_REQUIRED], - 'valign' => ['type' => XML_STRING | XML_REQUIRED], - 'halign' => ['type' => XML_STRING | XML_REQUIRED], - 'dynamic' => ['type' => XML_STRING | XML_REQUIRED], - 'sort_triggers' => ['type' => XML_STRING | XML_REQUIRED], - 'url' => ['type' => XML_STRING | XML_REQUIRED], - 'application' => ['type' => XML_STRING | XML_REQUIRED], - 'max_columns' => ['type' => XML_STRING | XML_REQUIRED] - ]] - ]] - ]] - ]], 'images' => ['type' => XML_INDEXED_ARRAY, 'prefix' => 'image', 'rules' => [ 'image' => ['type' => XML_ARRAY, 'rules' => [ 'name' => ['type' => XML_STRING | XML_REQUIRED], |