|
From: Paul S. O. <ps...@us...> - 2002-01-28 18:47:34
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv30091/includes
Modified Files:
search.php
Log Message:
Fix a couple of warning 'generators'
Index: search.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/search.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** search.php 2002/01/25 13:36:50 1.4
--- search.php 2002/01/28 18:47:31 1.5
***************
*** 119,133 ****
$title_match = ( $word_in == 'title' ) ? 1 : 0;
! if( count($search_matches) )
{
- $word = array();
sort($search_matches);
$word_text_sql = "";
for ($i = 0; $i < count($search_matches); $i++)
{
$search_matches[$i] = trim($search_matches[$i]);
! if( $search_matches[$i] != "" && $search_matches[$i] != $search_matches[$i-1] )
{
$word[] = $search_matches[$i];
--- 119,135 ----
$title_match = ( $word_in == 'title' ) ? 1 : 0;
! if( !empty($search_matches) )
{
sort($search_matches);
+ $word = array();
+ $prev_word = "";
$word_text_sql = "";
+
for ($i = 0; $i < count($search_matches); $i++)
{
$search_matches[$i] = trim($search_matches[$i]);
! if( $search_matches[$i] != "" && $search_matches[$i] != $prev_word )
{
$word[] = $search_matches[$i];
***************
*** 140,143 ****
--- 142,147 ----
$word_text_sql .= "'" . $search_matches[$i] . "'";
}
+
+ $prev_word = $search_matches[$i];
}
***************
*** 176,180 ****
}
! if( !$check_words[$word[$i]] )
{
$match_word[] = "'" . $word[$i] . "'";
--- 180,184 ----
}
! if( empty($check_words[$word[$i]]) )
{
$match_word[] = "'" . $word[$i] . "'";
|