mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
Make JumpNav work with Paste
Summary: Fixes T2336 Test Plan: Searched for Pastes successfully. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2336 Differential Revision: https://secure.phabricator.com/D4521
This commit is contained in:
parent
760ab135eb
commit
ed2c050bd5
2 changed files with 6 additions and 0 deletions
|
@ -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();
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue