Excluding disabled pages from landing page selection
authorAlexander Ebert <ebert@woltlab.com>
Wed, 13 Sep 2017 11:44:19 +0000 (13:44 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 13 Sep 2017 11:44:26 +0000 (13:44 +0200)
Fixes #2421

wcfsetup/install/files/acp/templates/applicationEdit.tpl
wcfsetup/install/files/lib/acp/form/ApplicationEditForm.class.php

index 8b2efa1f759f5fa186aab7b4930c44db1d5bbe07..20a003e3330837531d4f5c925dad3e54c7c081e7 100644 (file)
@@ -65,7 +65,7 @@
                                        <option value="0">{lang}wcf.global.noSelection{/lang}</option>
                                        
                                        {foreach from=$pageNodeList item=pageNode}
-                                               {if !$pageNode->requireObjectID}
+                                               {if !$pageNode->isDisabled && !$pageNode->requireObjectID}
                                                        <option value="{@$pageNode->pageID}"{if $pageNode->pageID == $landingPageID} selected{/if} data-identifier="{@$pageNode->identifier}">{if $pageNode->getDepth() > 1}{@"&nbsp;&nbsp;&nbsp;&nbsp;"|str_repeat:($pageNode->getDepth() - 1)}{/if}{$pageNode->name}</option>
                                                {/if}
                                        {/foreach}
index 0295a4c4add7847d785a64c96505a505de6ee949..d8403dbf7e3f33cbc57c8b219d76ac4cf4e07b18 100644 (file)
@@ -183,7 +183,7 @@ class ApplicationEditForm extends AbstractForm {
                        if (!$page->pageID) {
                                throw new UserInputException('landingPageID');
                        }
-                       else if ($page->requireObjectID) {
+                       else if ($page->requireObjectID || $page->isDisabled) {
                                throw new UserInputException('landingPageID', 'invalid');
                        }
                }