mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Always set a typeahead result limit, even for non-browse queries
Ref T4100. The limit on People queries was inadvertently removed.
This commit is contained in:
parent
ea97d75a67
commit
e558a2e729
1 changed files with 5 additions and 4 deletions
|
@ -43,13 +43,15 @@ final class PhabricatorTypeaheadModularDatasourceController
|
||||||
$composite = new PhabricatorTypeaheadRuntimeCompositeDatasource();
|
$composite = new PhabricatorTypeaheadRuntimeCompositeDatasource();
|
||||||
$composite->addDatasource($source);
|
$composite->addDatasource($source);
|
||||||
|
|
||||||
|
$hard_limit = 1000;
|
||||||
|
$limit = 100;
|
||||||
|
|
||||||
$composite
|
$composite
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->setQuery($query)
|
->setQuery($query)
|
||||||
->setRawQuery($raw_query);
|
->setRawQuery($raw_query)
|
||||||
|
->setLimit($limit);
|
||||||
|
|
||||||
$hard_limit = 1000;
|
|
||||||
$limit = 100;
|
|
||||||
|
|
||||||
if ($is_browse) {
|
if ($is_browse) {
|
||||||
if (!$composite->isBrowsable()) {
|
if (!$composite->isBrowsable()) {
|
||||||
|
@ -63,7 +65,6 @@ final class PhabricatorTypeaheadModularDatasourceController
|
||||||
}
|
}
|
||||||
|
|
||||||
$composite
|
$composite
|
||||||
->setLimit($limit + 1)
|
|
||||||
->setOffset($offset);
|
->setOffset($offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue