diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2012-02-25 19:58:03 +0100 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2012-02-25 19:58:03 +0100 |
| commit | 0c3fae0f18621498c9b4355fabb2e22d04891d5c (patch) | |
| tree | 4e82f21c9d74fc52c4efca57bfa2532dd9269b7b | |
| parent | b9da8f3a3309fd7cea8bfabfdf75e3dea4bf7b9a (diff) | |
| parent | 825aef72e89cb1150945950de93fa5cc0d9acbc1 (diff) | |
| download | forums-0c3fae0f18621498c9b4355fabb2e22d04891d5c.tar forums-0c3fae0f18621498c9b4355fabb2e22d04891d5c.tar.gz forums-0c3fae0f18621498c9b4355fabb2e22d04891d5c.tar.bz2 forums-0c3fae0f18621498c9b4355fabb2e22d04891d5c.tar.xz forums-0c3fae0f18621498c9b4355fabb2e22d04891d5c.zip | |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/10630] Use sql_like_expression() method instead of hardcoded LIKE '%x%'
[ticket/10630] Perform array_unique on authors array before creating the query
| -rw-r--r-- | phpBB/includes/search/base.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/search/fulltext_mysql.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/search/fulltext_native.php | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/search/base.php b/phpBB/includes/search/base.php index f691bc942f..b364dead9a 100644 --- a/phpBB/includes/search/base.php +++ b/phpBB/includes/search/base.php @@ -294,7 +294,7 @@ class phpbb_search_base $sql_where = ''; foreach ($authors as $author) { - $sql_where .= (($sql_where) ? ' OR ' : '') . 'search_authors LIKE \'% ' . (int) $author . ' %\''; + $sql_where .= (($sql_where) ? ' OR ' : '') . 'search_authors ' . $db->sql_like_expression($db->any_char . ' ' . (int) $author . ' ' . $db->any_char); } $sql = 'SELECT search_key diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 5372cfac7b..99467da978 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -708,7 +708,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base */ 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 b9085695ac..59d6a312b3 100644 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -1335,7 +1335,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base $db->sql_query($sql); } - $this->destroy_cache(array_unique($word_texts), $author_ids); + $this->destroy_cache(array_unique($word_texts), array_unique($author_ids)); } /** |
