search filters optimized, fetch authors only once from db

This commit is contained in:
plegall
2023-08-08 14:29:24 +02:00
parent a665efb4e0
commit 73e61749fe
+1 -1
View File
@@ -225,7 +225,7 @@ SELECT
{
$author_names[] = $author['author'];
}
$template->assign('AUTHORS', query2array($query));
$template->assign('AUTHORS', $authors);
// in case the search has forbidden authors for current user, we need to filter the search rule
$my_search['fields']['author']['words'] = array_intersect($my_search['fields']['author']['words'], $author_names);