1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

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
This commit is contained in:
epriestley 2017-01-31 13:23:11 -08:00
parent f7c3813586
commit b2de149009

View file

@ -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;