Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-1265 now.

fulltext_native / function tidy() calls wrong table (fix completed in vcs)

Lines 959 to line 962 is a SQL query that deals with removing common words. However, the current query:

Code: Select all
$sql = 'SELECT word_id, word_text
            FROM ' . SEARCH_WORDMATCH_TABLE . '
            GROUP BY word_id
            HAVING COUNT(word_id) > ' . floor($config['num_posts'] * 0.6);


is incorrect, as the wordmatch table does not contain the column word_text. Based on the query, I believe that the table needed is SEARCH_WORDLIST_TABLE, and thus the patch to fix:

Code: Select all
phpBB3/includes/search>diff -u fulltext_native.php.orig fulltext_native.php
--- fulltext_native.php.orig   Fri Jul 07 23:30:38 2006
+++ fulltext_native.php   Mon Jul 10 23:51:02 2006
@@ -957,7 +957,7 @@
       if ($config['num_posts'] >= 100)
       {
          $sql = 'SELECT word_id, word_text
-            FROM ' . SEARCH_WORDMATCH_TABLE . '
+            FROM ' . SEARCH_WORDLIST_TABLE . '
             GROUP BY word_id
             HAVING COUNT(word_id) > ' . floor($config['num_posts'] * 0.6);
          $result = $db->sql_query($sql);


NeoThermic

Comments / History

Linked ticket with changeset: r6167

Action performed by Anonymous (I am too lazy to register) on Jul 10th 2006, 23:55

Linked ticket with changeset: r6168

Action performed by Anonymous (I am too lazy to register) on Jul 11th 2006, 00:04

Ticket details

Related SVN changesets