1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

Don't select disabled menu items as default

Summary: Fixes T12969. If you disable "Home" but leave it at the top, we still load it.

Test Plan: Disabled "Home". Move Dashboard into first position, see correct home layout.

Reviewers: epriestley

Reviewed By: epriestley

Spies: Korvin

Maniphest Tasks: T12969

Differential Revision: https://secure.phabricator.com/D18455
This commit is contained in:
Chad Little 2017-08-23 09:36:47 -07:00
parent 8e680f17a9
commit 748725a47d

View file

@ -465,7 +465,7 @@ abstract class PhabricatorProfileMenuEngine extends Phobject {
$default = null;
$first = null;
foreach ($items as $item) {
if (!$item->canMakeDefault()) {
if (!$item->canMakeDefault() || $item->isDisabled()) {
continue;
}