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
This commit is contained in:
Andreas Fischer 2012-02-25 19:58:03 +01:00
commit 0c3fae0f18
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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));
}
/**

View file

@ -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));
}
/**