From afcf9cbc8617462853d3b42e4dfc9f1f46051e79 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 20 Feb 2012 02:14:23 +0100 Subject: [PATCH] [ticket/10630] Perform array_unique on authors array before creating the query This is needed to avoid an additional appearance for an author for every post he made. PHPBB3-10630 --- phpBB/includes/search/fulltext_mysql.php | 2 +- phpBB/includes/search/fulltext_native.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 29cdd8ee9a..52372a14d8 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -707,7 +707,7 @@ class fulltext_mysql extends search_backend */ function index_remove($post_ids, $author_ids, $forum_ids) { - $this->destroy_cache(array(), $author_ids); + $this->destroy_cache(array(), array_unique($author_ids)); } /** diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index 727e3aaffb..b63205fd76 100644 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -1334,7 +1334,7 @@ class fulltext_native extends search_backend $db->sql_query($sql); } - $this->destroy_cache(array_unique($word_texts), $author_ids); + $this->destroy_cache(array_unique($word_texts), array_unique($author_ids)); } /**