1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 03:34:04 +02:00

[ticket/13713] Rework batch size handling

PHPBB3-13713
This commit is contained in:
lavigor
2018-08-07 17:32:37 +03:00
committed by Marc Alexander
parent 35a81fce52
commit 8f21a7365d
15 changed files with 501 additions and 485 deletions

View File

@@ -52,12 +52,16 @@ class mention
$keyword = $this->request->variable('keyword', '', true);
$topic_id = $this->request->variable('topic_id', 0);
$names = [];
$hasNamesRemaining = false;
foreach ($this->mention_sources as $source)
{
$source->get($names, $keyword, $topic_id);
$hasNamesRemaining = !$source->get($names, $keyword, $topic_id) || $hasNamesRemaining;
}
return new JsonResponse(array_values($names));
return new JsonResponse([
'names' => array_values($names),
'all' => !$hasNamesRemaining,
]);
}
}