1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +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); $jump);
if ($response) { if ($response) {
return $response; return $response;
} else if ($request->isFormPost()) { } else if ($request->isFormPost()) {
$query = id(new PhabricatorSavedQuery()) $uri = new PhutilURI('/search/');
->setEngineClassName('PhabricatorSearchApplicationSearchEngine') $uri->setQueryParam('query', $jump);
->setParameter('query', $jump) $uri->setQueryParam('search:primary', 'true');
->save();
return id(new AphrontRedirectResponse()) return id(new AphrontRedirectResponse())->setURI((string)$uri);
->setURI('/search/'.$query->getQueryKey().'/');
} else { } else {
return id(new AphrontRedirectResponse())->setURI('/'); return id(new AphrontRedirectResponse())->setURI('/');
} }