From 443ec9dcb06755eb4ee758bb34e2e7ea72c051ae Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Wed, 4 Jun 2008 17:28:43 +0000 Subject: [PATCH] merging r8604 into trunk git-svn-id: file:///svn/phpbb/trunk@8606 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/search/fulltext_mysql.php | 4 ++-- phpBB/includes/search/fulltext_native.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 17cc6782c5..826ec9d4a1 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -465,8 +465,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': diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index 48a29e4f31..5d17ca4fdc 100644 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -807,8 +807,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': @@ -891,7 +891,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