Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-1265

fulltext_native / function tidy() calls wrong table

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • None
    • 3.0.B1
    • Search
    • None
    • PHP Environment:
      Database:

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

      $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:

      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

            ashe ashe
            NeoThermic NeoThermic [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: