diff -r bee40e39321b -r 01bf6b1b8222 plugins/SpecialSearch.php --- a/plugins/SpecialSearch.php Sat Oct 06 20:39:18 2007 -0400 +++ b/plugins/SpecialSearch.php Sat Oct 06 20:44:24 2007 -0400 @@ -100,18 +100,21 @@ if(!empty($q)) { // See if any pages directly match the title - - for ( $i = 0; $i < count ( $paths->pages ) / 2; $i++ ) + + if ( strlen($q) >= 4 ) { - $pg =& $paths->pages[$i]; - $q_lc = strtolower( str_replace(' ', '_', $q) ); - $q_tl = strtolower( str_replace('_', ' ', $q) ); - $p_lc = strtolower($pg['urlname']); - $p_tl = strtolower($pg['name']); - if ( strstr($p_tl, $q_tl) || strstr($p_lc, $q_lc) && $pg['visible'] == 1 ) + for ( $i = 0; $i < count ( $paths->pages ) / 2; $i++ ) { - echo '
'; - break; + $pg =& $paths->pages[$i]; + $q_lc = strtolower( str_replace(' ', '_', $q) ); + $q_tl = strtolower( str_replace('_', ' ', $q) ); + $p_lc = strtolower($pg['urlname']); + $p_tl = strtolower($pg['name']); + if ( strstr($p_tl, $q_tl) || strstr($p_lc, $q_lc) && $pg['visible'] == 1 ) + { + echo ' '; + break; + } } }