1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-02 23:07:39 +02:00

[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

View File

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