Make menu item page mandatory for internals links via GUI
authorMatthias Schmidt <gravatronics@live.com>
Wed, 17 Oct 2018 17:12:52 +0000 (19:12 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 17 Oct 2018 17:12:52 +0000 (19:12 +0200)
See #2545

wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php

index 64e943b2cbf261146aae0aa15b952b1133bbab46..13aaeae84cf78700356018d871607ac84d2a2df4 100644 (file)
@@ -332,17 +332,13 @@ class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPl
                                ->options(function() {
                                        $pageNodeList = (new PageNodeTree())->getNodeList();
                                        
-                                       $nestedOptions = [[
-                                               'depth' => 0,
-                                               'label' => 'wcf.global.noSelection',
-                                               'value' => ''
-                                       ]];
-                                       
                                        $packageIDs = array_merge(
                                                [$this->installation->getPackage()->packageID],
                                                array_keys($this->installation->getPackage()->getAllRequiredPackages())
                                        );
                                        
+                                       $nestedOptions = [];
+                                       
                                        /** @var PageNode $pageNode */
                                        foreach ($pageNodeList as $pageNode) {
                                                if (in_array($pageNode->packageID, $packageIDs)) {