1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 21:40:55 +01:00

Clicking the search icon in empty search field should link to advanced search

Summary: Fixes T6664, clicking search icon in empty search field should link to advanced search

Test Plan: navigate to home page, click search icon or click into search box and hit enter. Advanced search page should open.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6664

Differential Revision: https://secure.phabricator.com/D10947
This commit is contained in:
lkassianik 2014-12-08 11:27:15 -08:00 committed by epriestley
parent 139c63bd84
commit 4506018339

View file

@ -39,6 +39,11 @@ final class PhabricatorSearchController
// with only this piece of somewhat-sketchy code. See discussion in T4365.
if ($request->getBool('search:primary')) {
if (!strlen($request->getStr('query'))) {
$advanced_uri = '/search/query/advanced/';
return id(new AphrontRedirectResponse())->setURI($advanced_uri);
}
$named_queries = $engine->loadEnabledNamedQueries();
if ($named_queries) {
$named = head($named_queries);