1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-08 22:01:03 +01:00

Add query limit of PHP_INT_MAX and handle the case where there are no fulltext results.

This commit is contained in:
Jonathan Lomas 2012-06-15 15:41:20 -07:00
parent f91fc70b14
commit 60da804d3d

View file

@ -353,10 +353,15 @@ final class ManiphestTaskQuery {
// fulltext search, and then use that to limit the rest of the search
$fulltext_query = new PhabricatorSearchQuery();
$fulltext_query->setQuery($this->fullTextSearch);
$fulltext_query->setParameter('limit', PHP_INT_MAX);
$engine = PhabricatorSearchEngineSelector::newSelector()->newEngine();
$fulltext_results = $engine->executeSearch($fulltext_query);
if (empty($fulltext_results)) {
$fulltext_results = array(null);
}
return qsprintf(
$conn,
'phid IN (%Ls)',