Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/controller/PhabricatorSearchController.php
| <?php | <?php | ||||
| final class PhabricatorSearchController | final class PhabricatorSearchController | ||||
| extends PhabricatorSearchBaseController { | extends PhabricatorSearchBaseController { | ||||
| const SCOPE_CURRENT_APPLICATION = 'application'; | const SCOPE_CURRENT_APPLICATION = 'application'; | ||||
| public function shouldAllowPublic() { | public function shouldAllowPublic() { | ||||
| return true; | return true; | ||||
| } | } | ||||
| public function handleRequest(AphrontRequest $request) { | public function handleRequest(AphrontRequest $request) { | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| if ($request->getStr('jump') != 'no') { | if ($request->getStr('jump') != 'no') { | ||||
| $pref_jump = PhabricatorUserPreferences::PREFERENCE_SEARCHBAR_JUMP; | |||||
| if ($viewer->loadPreferences($pref_jump, 1)) { | |||||
| $response = PhabricatorJumpNavHandler::getJumpResponse( | $response = PhabricatorJumpNavHandler::getJumpResponse( | ||||
| $viewer, | $viewer, | ||||
| $request->getStr('query')); | $request->getStr('query')); | ||||
| if ($response) { | if ($response) { | ||||
| return $response; | return $response; | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| $engine = new PhabricatorSearchApplicationSearchEngine(); | $engine = new PhabricatorSearchApplicationSearchEngine(); | ||||
| $engine->setViewer($viewer); | $engine->setViewer($viewer); | ||||
| // If we're coming from primary search, do some special handling to | // If we're coming from primary search, do some special handling to | ||||
| // interpret the scope selector and query. | // interpret the scope selector and query. | ||||
| if ($request->getBool('search:primary')) { | if ($request->getBool('search:primary')) { | ||||
| ▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines | |||||