[ticket/13713] Fix variable name in controller

PHPBB3-13713
This commit is contained in:
lavigor 2018-09-13 18:53:00 +03:00 committed by Marc Alexander
parent 652e5e0753
commit 1d7d906771
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

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