From: Matthias Schmidt Date: Sun, 14 Oct 2018 10:35:07 +0000 (+0200) Subject: Fix writing menu or parent element of menu items via GUI X-Git-Tag: 5.2.0_Alpha_1~634 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=38d8fe8f0b32f516ef24d1cca67b97fc4efca696;p=GitHub%2FWoltLab%2FWCF.git Fix writing menu or parent element of menu items via GUI See #2545 --- 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));