diff --git a/src/applications/project/controller/PhabricatorProjectViewController.php b/src/applications/project/controller/PhabricatorProjectViewController.php index 7d5dc37e0b..2e53fe7276 100644 --- a/src/applications/project/controller/PhabricatorProjectViewController.php +++ b/src/applications/project/controller/PhabricatorProjectViewController.php @@ -20,6 +20,14 @@ final class PhabricatorProjectViewController $engine = $this->getProfileMenuEngine(); $default = $engine->getDefaultItem(); + // If defaults are broken somehow, serve the manage page. See T13033 for + // discussion. + if ($default) { + $default_key = $default->getBuiltinKey(); + } else { + $default_key = PhabricatorProject::ITEM_MANAGE; + } + switch ($default->getBuiltinKey()) { case PhabricatorProject::ITEM_WORKBOARD: $controller_object = new PhabricatorProjectBoardViewController(); @@ -27,6 +35,9 @@ final class PhabricatorProjectViewController case PhabricatorProject::ITEM_PROFILE: $controller_object = new PhabricatorProjectProfileController(); break; + case PhabricatorProject::ITEM_MANAGE: + $controller_object = new PhabricatorProjectManageController(); + break; default: return $engine->buildResponse(); } diff --git a/src/applications/project/menuitem/PhabricatorProjectManageProfileMenuItem.php b/src/applications/project/menuitem/PhabricatorProjectManageProfileMenuItem.php index ddb59ec095..1bd7e796dc 100644 --- a/src/applications/project/menuitem/PhabricatorProjectManageProfileMenuItem.php +++ b/src/applications/project/menuitem/PhabricatorProjectManageProfileMenuItem.php @@ -18,6 +18,11 @@ final class PhabricatorProjectManageProfileMenuItem return false; } + public function canMakeDefault( + PhabricatorProfileMenuItemConfiguration $config) { + return true; + } + public function getDisplayName( PhabricatorProfileMenuItemConfiguration $config) { $name = $config->getMenuItemProperty('name');