aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/search
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2009-08-05 15:28:46 +0000
committerJoas Schilling <nickvergessen@gmx.de>2009-08-05 15:28:46 +0000
commitee65d2147b7e672c6dfdcd695f0b6314c40e42d2 (patch)
treed089603d67b4225bafa5f11db59bdd9a99a850ca /phpBB/includes/search
parentd0e9e4189ce83390beeb58acefee05bff2e6b167 (diff)
downloadforums-ee65d2147b7e672c6dfdcd695f0b6314c40e42d2.tar
forums-ee65d2147b7e672c6dfdcd695f0b6314c40e42d2.tar.gz
forums-ee65d2147b7e672c6dfdcd695f0b6314c40e42d2.tar.bz2
forums-ee65d2147b7e672c6dfdcd695f0b6314c40e42d2.tar.xz
forums-ee65d2147b7e672c6dfdcd695f0b6314c40e42d2.zip
fix r9713 for #36565
Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9931 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/search')
-rw-r--r--phpBB/includes/search/fulltext_mysql.php6
-rw-r--r--phpBB/includes/search/fulltext_native.php6
2 files changed, 4 insertions, 8 deletions
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index 456a11f24e..f9efa2bcb5 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -444,8 +444,7 @@ class fulltext_mysql extends search_backend
if (sizeof($author_ary) && $author_name)
{
// first one matches post of registered users, second one guests and deleted users
- $sql_author = ' AND (' . $db->sql_in_set('p.poster_id', $author_ary) . " AND p.post_username = ''";
- $sql_author .= ' OR p.poster_id = ' . ANONYMOUS . ' AND p.post_username ' . $author_name . ')';
+ $sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
}
else if (sizeof($author_ary))
{
@@ -553,8 +552,7 @@ class fulltext_mysql extends search_backend
if ($author_name)
{
// first one matches post of registered users, second one guests and deleted users
- $sql_author = '(' . $db->sql_in_set('p.poster_id', $author_ary) . " AND p.post_username = ''";
- $sql_author .= ' OR p.poster_id = ' . ANONYMOUS . ' AND p.post_username ' . $author_name . ')';
+ $sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
}
else
{
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index 513a16bc58..5af3929ccd 100644
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -628,8 +628,7 @@ class fulltext_native extends search_backend
if ($author_name)
{
// first one matches post of registered users, second one guests and deleted users
- $sql_author = '(' . $db->sql_in_set('p.poster_id', $author_ary) . " AND p.post_username = ''";
- $sql_author .= ' OR p.poster_id = ' . ANONYMOUS . ' AND p.post_username ' . $author_name . ')';
+ $sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
}
else
{
@@ -840,8 +839,7 @@ class fulltext_native extends search_backend
if ($author_name)
{
// first one matches post of registered users, second one guests and deleted users
- $sql_author = '(' . $db->sql_in_set('p.poster_id', $author_ary) . " AND p.post_username = ''";
- $sql_author .= ' OR p.poster_id = ' . ANONYMOUS . ' AND p.post_username ' . $author_name . ')';
+ $sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
}
else
{