Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/engine/PhabricatorProfileMenuEngine.php
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | switch ($item_action) { | ||||
case 'info': | case 'info': | ||||
case 'hide': | case 'hide': | ||||
case 'default': | case 'default': | ||||
case 'builtin': | case 'builtin': | ||||
if (!$selected_item) { | if (!$selected_item) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
break; | break; | ||||
case 'edit': | |||||
if (!$request->getURIData('id')) { | |||||
// If we continue along the "edit" pathway without an ID, we hit an | |||||
// unrelated exception because we can not build a new menu item out | |||||
// of thin air. For menus, new items are created via the "new" | |||||
// action. Just catch this case and 404 early since there's currently | |||||
// no clean way to make EditEngine aware of this. | |||||
return new Aphront404Response(); | |||||
} | |||||
break; | |||||
} | } | ||||
$navigation = $this->buildNavigation(); | $navigation = $this->buildNavigation(); | ||||
$navigation->selectFilter('item.configure'); | $navigation->selectFilter('item.configure'); | ||||
$crumbs = $controller->buildApplicationCrumbsForEditEngine(); | $crumbs = $controller->buildApplicationCrumbsForEditEngine(); | ||||
switch ($item_action) { | switch ($item_action) { | ||||
▲ Show 20 Lines • Show All 886 Lines • Show Last 20 Lines |