diff --git a/src/applications/directory/controller/PhabricatorDirectoryMainController.php b/src/applications/directory/controller/PhabricatorDirectoryMainController.php index 360fc6c2dc..5d8f01576d 100644 --- a/src/applications/directory/controller/PhabricatorDirectoryMainController.php +++ b/src/applications/directory/controller/PhabricatorDirectoryMainController.php @@ -72,7 +72,9 @@ final class PhabricatorDirectoryMainController $jump = $request->getStr('jump'); $response = PhabricatorJumpNavHandler::jumpPostResponse($jump); + if ($response) { + return $response; } else if ($request->isFormPost()) { $query = new PhabricatorSearchQuery(); diff --git a/src/applications/search/engine/PhabricatorJumpNavHandler.php b/src/applications/search/engine/PhabricatorJumpNavHandler.php index ab0859609e..6087033305 100644 --- a/src/applications/search/engine/PhabricatorJumpNavHandler.php +++ b/src/applications/search/engine/PhabricatorJumpNavHandler.php @@ -19,6 +19,7 @@ final class PhabricatorJumpNavHandler { '/^r([A-Z]+)(\S+)$/' => 'commit', '/^d(\d+)$/i' => 'revision', '/^t(\d+)$/i' => 'task', + '/^p(\d+)$/i' => 'paste', '/^p\s+(.+)$/i' => 'project', '/^u\s+(\S+)$/i' => 'user', '/^task:\s*(.+)/i' => 'create-task', @@ -49,6 +50,9 @@ final class PhabricatorJumpNavHandler { case 'user': return id(new AphrontRedirectResponse()) ->setURI('/p/'.$matches[1].'/'); + case 'paste': + return id(new AphrontRedirectResponse()) + ->setURI('/P'.$matches[1]); case 'project': $project = self::findCloselyNamedProject($matches[1]); if ($project) {