Page MenuHomePhabricator

D17165.id.diff
No OneTemporary

D17165.id.diff

diff --git a/src/applications/search/engine/PhabricatorProfileMenuEngine.php b/src/applications/search/engine/PhabricatorProfileMenuEngine.php
--- a/src/applications/search/engine/PhabricatorProfileMenuEngine.php
+++ b/src/applications/search/engine/PhabricatorProfileMenuEngine.php
@@ -114,6 +114,16 @@
return new Aphront404Response();
}
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();
diff --git a/src/applications/search/query/PhabricatorProfileMenuItemConfigurationQuery.php b/src/applications/search/query/PhabricatorProfileMenuItemConfigurationQuery.php
--- a/src/applications/search/query/PhabricatorProfileMenuItemConfigurationQuery.php
+++ b/src/applications/search/query/PhabricatorProfileMenuItemConfigurationQuery.php
@@ -80,6 +80,7 @@
continue;
}
$item_type = clone $item_type;
+ $item_type->setViewer($this->getViewer());
$item->attachMenuItem($item_type);
}

File Metadata

Mime Type
text/plain
Expires
Tue, May 21, 7:10 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6264834
Default Alt Text
D17165.id.diff (1 KB)

Event Timeline