1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Fix jump nav for new search stuff

Summary: Ref T4365. Aligns jump nav with the normal search behavior.

Test Plan: Typed some junk into the jump nav, mashed return.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4365

Differential Revision: https://secure.phabricator.com/D8136
This commit is contained in:
epriestley 2014-02-03 14:30:16 -08:00
parent ca6b9f66e1
commit caa15b1732

View file

@ -95,16 +95,13 @@ final class PhabricatorHomeMainController
$jump);
if ($response) {
return $response;
} else if ($request->isFormPost()) {
$query = id(new PhabricatorSavedQuery())
->setEngineClassName('PhabricatorSearchApplicationSearchEngine')
->setParameter('query', $jump)
->save();
$uri = new PhutilURI('/search/');
$uri->setQueryParam('query', $jump);
$uri->setQueryParam('search:primary', 'true');
return id(new AphrontRedirectResponse())
->setURI('/search/'.$query->getQueryKey().'/');
return id(new AphrontRedirectResponse())->setURI((string)$uri);
} else {
return id(new AphrontRedirectResponse())->setURI('/');
}