diff options
| author | Nils Adermann <naderman@naderman.de> | 2006-03-26 01:36:26 +0000 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2006-03-26 01:36:26 +0000 |
| commit | 8a32e0de742d9d4fd453402a48889bc6edd6a7f9 (patch) | |
| tree | 83da50045e715ee7c47e8ea84e528a7fc17f58a6 /phpBB/includes/search/fulltext_phpbb.php | |
| parent | ed32b4d8dc396a656a6a0b84f9a40c5fce53278a (diff) | |
| download | forums-8a32e0de742d9d4fd453402a48889bc6edd6a7f9.tar forums-8a32e0de742d9d4fd453402a48889bc6edd6a7f9.tar.gz forums-8a32e0de742d9d4fd453402a48889bc6edd6a7f9.tar.bz2 forums-8a32e0de742d9d4fd453402a48889bc6edd6a7f9.tar.xz forums-8a32e0de742d9d4fd453402a48889bc6edd6a7f9.zip | |
- correctly use DISTINCT and GROUP BY in search related SQL [Bug #1256]
- always display views and replies in search results [Bug #1223]
- display error messages occuring during search index creation/deletion [Bug #1274]
- correctly align the ACP link on the search results page [Bug #1160]
- fixed the search forum box [Bug #1300] and added a search topic box (subBlue: can you please position this a little more visible, didn't want to mess with the CSS ;-))
- correctly check and use show_results on the search page
git-svn-id: file:///svn/phpbb/trunk@5727 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/search/fulltext_phpbb.php')
| -rw-r--r-- | phpBB/includes/search/fulltext_phpbb.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/includes/search/fulltext_phpbb.php b/phpBB/includes/search/fulltext_phpbb.php index 6d9a33baaa..b01e70621b 100644 --- a/phpBB/includes/search/fulltext_phpbb.php +++ b/phpBB/includes/search/fulltext_phpbb.php @@ -405,15 +405,15 @@ class fulltext_phpbb extends search_backend if ($sql_in) { - $sql = "SELECT $sql_select, COUNT(DISTINCT m.word_id) as matches + $sql = "SELECT $sql_select, COUNT(DISTINCT m.word_id) as matches, " . $sort_by_sql[$sort_key] . " FROM $sql_from$sql_sort_table" . POSTS_TABLE . ' p, ' . SEARCH_MATCH_TABLE . ' m, ' . SEARCH_WORD_TABLE . " w WHERE w.word_text IN ($sql_in) AND m.word_id = w.word_id AND w.word_common <> 1 AND p.post_id = m.post_id $sql_where_options - GROUP BY $field - ORDER BY $sql_sort"; + GROUP BY $field, " . $sort_by_sql[$sort_key] . ' + ORDER BY ' . $sql_sort; $result = $db->sql_query($sql); if (!($row = $db->sql_fetchrow($result))) @@ -689,8 +689,8 @@ class fulltext_phpbb extends search_backend AND t.topic_id = p.topic_id $sql_sort_join $sql_time - GROUP BY t.topic_id - ORDER BY $sql_sort"; + GROUP BY t.topic_id, " . $sort_by_sql[$sort_key] . ' + ORDER BY ' . $sql_sort; $field = 'topic_id'; } |
