merging r8604 into trunk

git-svn-id: file:///svn/phpbb/trunk@8606 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann 2008-06-04 17:28:43 +00:00
parent e08a400b9f
commit 443ec9dcb0
2 changed files with 5 additions and 5 deletions

View file

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

View file

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