aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-02-25 19:46:17 +0100
committerAndreas Fischer <bantu@phpbb.com>2012-02-25 19:46:17 +0100
commit825aef72e89cb1150945950de93fa5cc0d9acbc1 (patch)
treedcade4bcdc21cf983b851a2697e0f54f768f5737 /phpBB
parent8cb95b3b843fa02f9e358f0571bf795c40e13775 (diff)
parentef154b78a169402e7f968cd2189b69b041a73543 (diff)
downloadforums-825aef72e89cb1150945950de93fa5cc0d9acbc1.tar
forums-825aef72e89cb1150945950de93fa5cc0d9acbc1.tar.gz
forums-825aef72e89cb1150945950de93fa5cc0d9acbc1.tar.bz2
forums-825aef72e89cb1150945950de93fa5cc0d9acbc1.tar.xz
forums-825aef72e89cb1150945950de93fa5cc0d9acbc1.zip
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
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/search/fulltext_mysql.php2
-rw-r--r--phpBB/includes/search/fulltext_native.php2
-rw-r--r--phpBB/includes/search/search.php2
3 files changed, 3 insertions, 3 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));
}
/**
diff --git a/phpBB/includes/search/search.php b/phpBB/includes/search/search.php
index 2f20d11495..df7c8a0892 100644
--- a/phpBB/includes/search/search.php
+++ b/phpBB/includes/search/search.php
@@ -295,7 +295,7 @@ class search_backend
$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