mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge remote-tracking branch 'nickvergessen/ticket/10630' into develop-olympus
* nickvergessen/ticket/10630: [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
825aef72e8
3 changed files with 3 additions and 3 deletions
|
@ -707,7 +707,7 @@ class fulltext_mysql extends search_backend
|
||||||
*/
|
*/
|
||||||
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1334,7 +1334,7 @@ class fulltext_native extends search_backend
|
||||||
$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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -295,7 +295,7 @@ class search_backend
|
||||||
$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
|
||||||
|
|
Loading…
Add table
Reference in a new issue