diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-02-14 17:43:56 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-02-14 17:43:56 +0000 |
commit | 4421575ccb255f6835b125daf238fb565055b014 (patch) | |
tree | 24fe235907fda28f60bfaf389fe4806d118c5c1c | |
parent | c95ae7fb21ec730b140e1e14f84db095d2f56e9e (diff) | |
download | forums-4421575ccb255f6835b125daf238fb565055b014.tar forums-4421575ccb255f6835b125daf238fb565055b014.tar.gz forums-4421575ccb255f6835b125daf238fb565055b014.tar.bz2 forums-4421575ccb255f6835b125daf238fb565055b014.tar.xz forums-4421575ccb255f6835b125daf238fb565055b014.zip |
Should fix error with DB != MSSQL || MySQL bug #517151
git-svn-id: file:///svn/phpbb/trunk@2146 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/includes/search.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/phpBB/includes/search.php b/phpBB/includes/search.php index 2cbe4b1fbe..7ecd9b327a 100644 --- a/phpBB/includes/search.php +++ b/phpBB/includes/search.php @@ -115,12 +115,10 @@ function add_search_words($post_id, $post_text, $post_title = "") $search_raw_words['title'] = split_words(clean_words("post", $post_title, $synonym_array)); $word = array(); - $word_text_sql = array(); while( list($word_in, $search_matches) = @each($search_raw_words) ) { if( !empty($search_matches) ) { - $word_text_sql[$word_in] = ""; for ($i = 0; $i < count($search_matches); $i++) { $search_matches[$i] = trim($search_matches[$i]); @@ -128,7 +126,6 @@ function add_search_words($post_id, $post_text, $post_title = "") if( $search_matches[$i] != "" ) { $word[] = $search_matches[$i]; - $word_text_sql[$word_in] .= ( ( $word_text_sql[$word_in] != "" ) ? ", " : "" ) . "'" . $search_matches[$i] . "'"; } } } @@ -139,12 +136,14 @@ function add_search_words($post_id, $post_text, $post_title = "") sort($word); $prev_word = ""; + $word_text_sql = ""; $temp_word = array(); for($i = 0; $i < count($word); $i++) { if ( $word[$i] != $prev_word ) { $temp_word[] = $word[$i]; + $word_text_sql .= ( ( $word_text_sql != "" ) ? ", " : "" ) . "'" . $word[$i] . "'"; } $prev_word = $word[$i]; } |