Differential D15924 Diff 38350 src/applications/search/controller/PhabricatorApplicationSearchController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/controller/PhabricatorApplicationSearchController.php
Show First 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | private function processSearchRequest() { | ||||
} else { | } else { | ||||
$box->setForm($form); | $box->setForm($form); | ||||
} | } | ||||
$body[] = $box; | $body[] = $box; | ||||
if ($run_query) { | if ($run_query) { | ||||
$exec_errors = array(); | |||||
$box->setAnchor( | $box->setAnchor( | ||||
id(new PhabricatorAnchorView()) | id(new PhabricatorAnchorView()) | ||||
->setAnchorName('R')); | ->setAnchorName('R')); | ||||
try { | try { | ||||
$engine->setRequest($request); | $engine->setRequest($request); | ||||
$query = $engine->buildQueryFromSavedQuery($saved_query); | $query = $engine->buildQueryFromSavedQuery($saved_query); | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | if ($run_query) { | ||||
->addPadding(PHUI::PADDING_MEDIUM) | ->addPadding(PHUI::PADDING_MEDIUM) | ||||
->addMargin(PHUI::MARGIN_LARGE) | ->addMargin(PHUI::MARGIN_LARGE) | ||||
->setBorder(true) | ->setBorder(true) | ||||
->appendChild($pager); | ->appendChild($pager); | ||||
$body[] = $pager_box; | $body[] = $pager_box; | ||||
} | } | ||||
} | } | ||||
} catch (PhabricatorTypeaheadInvalidTokenException $ex) { | } catch (PhabricatorTypeaheadInvalidTokenException $ex) { | ||||
$errors[] = pht( | $exec_errors[] = pht( | ||||
'This query specifies an invalid parameter. Review the '. | 'This query specifies an invalid parameter. Review the '. | ||||
'query parameters and correct errors.'); | 'query parameters and correct errors.'); | ||||
} | } | ||||
// The engine may have encountered additional errors during rendering; | |||||
// merge them in and show everything. | |||||
foreach ($engine->getErrors() as $error) { | |||||
$exec_errors[] = $error; | |||||
} | |||||
$errors = $exec_errors; | |||||
} | } | ||||
if ($errors) { | if ($errors) { | ||||
$box->setFormErrors($errors, pht('Query Errors')); | $box->setFormErrors($errors, pht('Query Errors')); | ||||
} | } | ||||
$crumbs = $parent | $crumbs = $parent | ||||
->buildApplicationCrumbs() | ->buildApplicationCrumbs() | ||||
▲ Show 20 Lines • Show All 168 Lines • Show Last 20 Lines |