diff options
author | Nils Adermann <naderman@naderman.de> | 2006-08-13 12:23:32 +0000 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2006-08-13 12:23:32 +0000 |
commit | 559ff6c678bc0ad2a07b34d0534012282b3d1dfa (patch) | |
tree | 04252bbb306a1e8a4bd0dd3833a7657d56512c9d /phpBB/includes/search/fulltext_native.php | |
parent | dced943db5478126b87d1c311915471525cc4419 (diff) | |
download | forums-559ff6c678bc0ad2a07b34d0534012282b3d1dfa.tar forums-559ff6c678bc0ad2a07b34d0534012282b3d1dfa.tar.gz forums-559ff6c678bc0ad2a07b34d0534012282b3d1dfa.tar.bz2 forums-559ff6c678bc0ad2a07b34d0534012282b3d1dfa.tar.xz forums-559ff6c678bc0ad2a07b34d0534012282b3d1dfa.zip |
we don't want all topics when searching for just a few\!
git-svn-id: file:///svn/phpbb/trunk@6289 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/search/fulltext_native.php')
-rwxr-xr-x | phpBB/includes/search/fulltext_native.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index bc11d2ed20..e4ff1f8fc2 100755 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -357,12 +357,6 @@ class fulltext_native extends search_backend ); $sql_where[] = 'm0.post_id = p.post_id'; - if ($type == 'topics') - { - $sql_array['FROM'][TOPICS_TABLE] = 't'; - $group_by = true; - } - $title_match = ''; $group_by = true; // Build some display specific sql strings @@ -383,6 +377,16 @@ class fulltext_native extends search_backend break; } + if ($type == 'topics') + { + if (!isset($sql_array['FROM'][TOPICS_TABLE])) + { + $sql_array['FROM'][TOPICS_TABLE] = 't'; + $sql_where[] = 'p.topic_id = t.topic_id'; + } + $group_by = true; + } + /** * @todo Add a query optimizer (handle stuff like "+(4|3) +4") */ |