mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
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:
commit
0c3fae0f18
3 changed files with 3 additions and 3 deletions
|
@ -294,7 +294,7 @@ class phpbb_search_base
|
||||||
$sql_where = '';
|
$sql_where = '';
|
||||||
foreach ($authors as $author)
|
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
|
$sql = 'SELECT search_key
|
||||||
|
|
|
@ -708,7 +708,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
|
||||||
*/
|
*/
|
||||||
function index_remove($post_ids, $author_ids, $forum_ids)
|
function index_remove($post_ids, $author_ids, $forum_ids)
|
||||||
{
|
{
|
||||||
$this->destroy_cache(array(), $author_ids);
|
$this->destroy_cache(array(), array_unique($author_ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1335,7 +1335,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->destroy_cache(array_unique($word_texts), $author_ids);
|
$this->destroy_cache(array_unique($word_texts), array_unique($author_ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue