From b2de1490093c7b70f7b1d7946926661ff66caaf9 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 31 Jan 2017 13:23:11 -0800 Subject: [PATCH] Allow menu items to be edited again Summary: Ref T12174. We now require that we can figure out a valid "edit mode" (global vs custom/personal) before we hit EditEngine. Since the EditEngine routes don't have an `itemID`, they would failu to figure out the mode and just 404. Let the engine use `id` (from EditEngine) if `itemID` (from MenuEngine) isn't present in the route. Test Plan: - Edited some menu items on Home / Projects. - (I think I tested this, then broke it, originally.) Reviewers: chad Reviewed By: chad Maniphest Tasks: T12174 Differential Revision: https://secure.phabricator.com/D17280 --- .../search/engine/PhabricatorProfileMenuEngine.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/applications/search/engine/PhabricatorProfileMenuEngine.php b/src/applications/search/engine/PhabricatorProfileMenuEngine.php index 6f0b1542eb..319d1fa774 100644 --- a/src/applications/search/engine/PhabricatorProfileMenuEngine.php +++ b/src/applications/search/engine/PhabricatorProfileMenuEngine.php @@ -130,6 +130,13 @@ abstract class PhabricatorProfileMenuEngine extends Phobject { } $item_id = $request->getURIData('itemID'); + + // If we miss on the MenuEngine route, try the EditEngine route. This will + // be populated while editing items. + if (!$item_id) { + $item_id = $request->getURIData('id'); + } + $item_list = $this->getItems(); $selected_item = null;