From fb193106314ea91cd5428d5151d13bb8a308acc0 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 9 Apr 2019 14:21:29 -0700 Subject: [PATCH] Fix some overlooked profile menu construction callsites Summary: Depends on D20384. Ref T13275. A bunch of this code got converted but I missed some callsites that aren't reached directly from the menu. Test Plan: - Visited each controller, saw actual pages instead of menu construction fatals. - Grepped for `getProfileMenu()`. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13275 Differential Revision: https://secure.phabricator.com/D20385 --- .../controller/PhabricatorPeopleProfileEditController.php | 5 +++-- .../controller/PhabricatorPeopleProfilePictureController.php | 5 +++-- .../PhabricatorProjectBoardBackgroundController.php | 4 +++- .../controller/PhabricatorProjectBoardManageController.php | 4 +++- .../controller/PhabricatorProjectColumnDetailController.php | 4 +++- .../controller/PhabricatorProjectEditPictureController.php | 5 +++-- 6 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/applications/people/controller/PhabricatorPeopleProfileEditController.php b/src/applications/people/controller/PhabricatorPeopleProfileEditController.php index 4876f4495d..3af95462a9 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileEditController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileEditController.php @@ -83,8 +83,9 @@ final class PhabricatorPeopleProfileEditController $crumbs->addTextCrumb(pht('Edit Profile')); $crumbs->setBorder(true); - $nav = $this->getProfileMenu(); - $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_MANAGE); + $nav = $this->newNavigation( + $user, + PhabricatorPeopleProfileMenuEngine::ITEM_MANAGE); $header = id(new PHUIHeaderView()) ->setHeader(pht('Edit Profile: %s', $user->getFullName())) diff --git a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php index 92bb2e0b86..d50eccff13 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php @@ -266,8 +266,9 @@ final class PhabricatorPeopleProfilePictureController $crumbs->addTextCrumb(pht('Edit Profile Picture')); $crumbs->setBorder(true); - $nav = $this->getProfileMenu(); - $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_MANAGE); + $nav = $this->newNavigation( + $user, + PhabricatorPeopleProfileMenuEngine::ITEM_MANAGE); $header = $this->buildProfileHeader(); diff --git a/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php b/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php index c70c211398..7859091de6 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php @@ -52,7 +52,9 @@ final class PhabricatorProjectBoardBackgroundController ->setURI($view_uri); } - $nav = $this->getProfileMenu(); + $nav = $this->newNavigation( + $board, + PhabricatorProject::ITEM_WORKBOARD); $crumbs = id($this->buildApplicationCrumbs()) ->addTextCrumb(pht('Workboard'), $board->getWorkboardURI()) diff --git a/src/applications/project/controller/PhabricatorProjectBoardManageController.php b/src/applications/project/controller/PhabricatorProjectBoardManageController.php index 21daf2e654..b2b6dfdf6d 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardManageController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardManageController.php @@ -38,7 +38,9 @@ final class PhabricatorProjectBoardManageController $crumbs->addTextCrumb(pht('Manage')); $crumbs->setBorder(true); - $nav = $this->getProfileMenu(); + $nav = $this->newNavigation( + $board, + PhabricatorProject::ITEM_WORKBOARD); $columns_list = $this->buildColumnsList($board, $columns); require_celerity_resource('project-view-css'); diff --git a/src/applications/project/controller/PhabricatorProjectColumnDetailController.php b/src/applications/project/controller/PhabricatorProjectColumnDetailController.php index 781461a812..016999bbe6 100644 --- a/src/applications/project/controller/PhabricatorProjectColumnDetailController.php +++ b/src/applications/project/controller/PhabricatorProjectColumnDetailController.php @@ -51,7 +51,9 @@ final class PhabricatorProjectColumnDetailController $crumbs->addTextCrumb(pht('Column: %s', $title)); $crumbs->setBorder(true); - $nav = $this->getProfileMenu(); + $nav = $this->newNavigation( + $project, + PhabricatorProject::ITEM_WORKBOARD); require_celerity_resource('project-view-css'); $view = id(new PHUITwoColumnView()) diff --git a/src/applications/project/controller/PhabricatorProjectEditPictureController.php b/src/applications/project/controller/PhabricatorProjectEditPictureController.php index e601d744c0..d141dc07e2 100644 --- a/src/applications/project/controller/PhabricatorProjectEditPictureController.php +++ b/src/applications/project/controller/PhabricatorProjectEditPictureController.php @@ -273,8 +273,9 @@ final class PhabricatorProjectEditPictureController ->setHeaderText(pht('Upload New Picture')) ->setForm($upload_form); - $nav = $this->getProfileMenu(); - $nav->selectFilter(PhabricatorProject::ITEM_MANAGE); + $nav = $this->newNavigation( + $project, + PhabricatorProject::ITEM_MANAGE); return $this->newPage() ->setTitle($title)