From caa15b173221b2784d451d24ddaa5abf33ba086e Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 3 Feb 2014 14:30:16 -0800 Subject: [PATCH] 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 --- .../home/controller/PhabricatorHomeMainController.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/applications/home/controller/PhabricatorHomeMainController.php b/src/applications/home/controller/PhabricatorHomeMainController.php index f15dd6edec..bbd2bbc4d8 100644 --- a/src/applications/home/controller/PhabricatorHomeMainController.php +++ b/src/applications/home/controller/PhabricatorHomeMainController.php @@ -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('/'); }