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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user