From 748725a47d3857da693c905a77b5f37e4fc37e96 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 23 Aug 2017 09:36:47 -0700 Subject: [PATCH] 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 --- src/applications/search/engine/PhabricatorProfileMenuEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/search/engine/PhabricatorProfileMenuEngine.php b/src/applications/search/engine/PhabricatorProfileMenuEngine.php index 7b1e213d20..90f056ac4f 100644 --- a/src/applications/search/engine/PhabricatorProfileMenuEngine.php +++ b/src/applications/search/engine/PhabricatorProfileMenuEngine.php @@ -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; }