includes/search.php
changeset 1367 c660cf54c045
parent 1289 541bb25d0b22
equal deleted inserted replaced
1366:23f89f989922 1367:c660cf54c045
   274 					foreach ( $where_any as $qword )
   274 					foreach ( $where_any as $qword )
   275 					{
   275 					{
   276 						if ( strstr($word_cs, $qword) )
   276 						if ( strstr($word_cs, $qword) )
   277 							$lev_array[ $qword ] = levenshtein($qword, $word_cs);
   277 							$lev_array[ $qword ] = levenshtein($qword, $word_cs);
   278 					}
   278 					}
   279 					if ( min($lev_array) > 3 )
   279 					if ( count($lev_array) && min($lev_array) > 3 )
   280 					{
   280 					{
   281 						$inc /= array_sum($lev_array) / count($lev_array);
   281 						$inc /= array_sum($lev_array) / count($lev_array);
   282 					}
   282 					}
   283 					
   283 					
   284 					if ( isset($scores[$match]) )
   284 					if ( isset($scores[$match]) )