1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-08 08:35:31 +02:00

Topic searches by author no longer return invalid results [Bug #11777]

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8604 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann 2008-06-04 17:25:50 +00:00
parent fe80d95e8d
commit fb1d71bd05
2 changed files with 5 additions and 5 deletions

View File

@ -546,8 +546,8 @@ class fulltext_mysql extends search_backend
break;
case 't':
$sql_sort_table = ($type == 'posts') ? TOPICS_TABLE . ' t, ' : '';
$sql_sort_join = ($type == 'posts') ? ' AND t.topic_id = p.topic_id ' : '';
$sql_sort_table = ($type == 'posts' && !$firstpost_only) ? TOPICS_TABLE . ' t, ' : '';
$sql_sort_join = ($type == 'posts' && !$firstpost_only) ? ' AND t.topic_id = p.topic_id ' : '';
break;
case 'f':

View File

@ -813,8 +813,8 @@ class fulltext_native extends search_backend
break;
case 't':
$sql_sort_table = ($type == 'posts') ? TOPICS_TABLE . ' t, ' : '';
$sql_sort_join = ($type == 'posts') ? ' AND t.topic_id = p.topic_id ' : '';
$sql_sort_table = ($type == 'posts' && !$firstpost_only) ? TOPICS_TABLE . ' t, ' : '';
$sql_sort_join = ($type == 'posts' && !$firstpost_only) ? ' AND t.topic_id = p.topic_id ' : '';
break;
case 'f':
@ -900,7 +900,7 @@ class fulltext_native extends search_backend
if ($type == 'posts')
{
$sql = "SELECT $select
FROM " . $sql_sort_table . POSTS_TABLE . ' p' . (($topic_id || $firstpost_only) ? ', ' . TOPICS_TABLE . ' t' : '') . "
FROM " . $sql_sort_table . POSTS_TABLE . ' p' . (($firstpost_only) ? ', ' . TOPICS_TABLE . ' t' : '') . "
WHERE $sql_author
$sql_topic_id
$sql_firstpost