From 38d8fe8f0b32f516ef24d1cca67b97fc4efca696 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 14 Oct 2018 12:35:07 +0200 Subject: [PATCH] Fix writing menu or parent element of menu items via GUI See #2545 --- .../plugin/MenuItemPackageInstallationPlugin.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php index 5baca1fec8..3059495770 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php @@ -554,12 +554,12 @@ class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPl $menuItem = $document->createElement($this->tagName); $menuItem->setAttribute('identifier', $data['identifier']); - if (!empty($data['menu'])) { - $menuItem->appendChild($document->createElement('menu', $data['menu'])); - } - else if (!empty($data['parent'])) { + if (!empty($data['parent'])) { $menuItem->appendChild($document->createElement('parent', $data['parent'])); } + else if (!empty($data['menu'])) { + $menuItem->appendChild($document->createElement('menu', $data['menu'])); + } foreach ($formData['title_i18n'] as $languageID => $title) { $title = $document->createElement('title', $this->getAutoCdataValue($title)); -- 2.20.1