@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make profile menu `/edit/` requests explicitly 404

Summary:
See D17160. Previously, the `/edit/` route was never linked, but fataled when accessed. Make it 404 instead.

Also, fix an issue where editing "Application" menu items would fail because they didn't have a viewer.

Test Plan:
- Hit `/edit/`, got a 404.
- Edited an "Application" item.
- Moved, added, deleted, and edited other items.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D17165

+11
+10
src/applications/search/engine/PhabricatorProfileMenuEngine.php
··· 114 114 return new Aphront404Response(); 115 115 } 116 116 break; 117 + case 'edit': 118 + if (!$request->getURIData('id')) { 119 + // If we continue along the "edit" pathway without an ID, we hit an 120 + // unrelated exception because we can not build a new menu item out 121 + // of thin air. For menus, new items are created via the "new" 122 + // action. Just catch this case and 404 early since there's currently 123 + // no clean way to make EditEngine aware of this. 124 + return new Aphront404Response(); 125 + } 126 + break; 117 127 } 118 128 119 129 $navigation = $this->buildNavigation();
+1
src/applications/search/query/PhabricatorProfileMenuItemConfigurationQuery.php
··· 80 80 continue; 81 81 } 82 82 $item_type = clone $item_type; 83 + $item_type->setViewer($this->getViewer()); 83 84 $item->attachMenuItem($item_type); 84 85 } 85 86