diff -r 6f357b951f7a -r 47393c6619ea plugins/SpecialSearch.php --- a/plugins/SpecialSearch.php Sun Sep 02 00:33:22 2007 -0400 +++ b/plugins/SpecialSearch.php Tue Sep 04 08:25:48 2007 -0400 @@ -84,6 +84,18 @@ } } $q = trim($q); + + if ( !empty($q) && !isset($_GET['search']) ) + { + list($pid, $ns) = RenderMan::strToPageID($q); + $pid = sanitize_page_id($pid); + $key = $paths->nslist[$ns] . $pid; + if ( isPage($key) ) + { + redirect(makeUrl($key), 'Results', 'found page', 0); + } + } + $template->header(); if(!empty($q)) { @@ -96,7 +108,7 @@ $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) ) + if ( strstr($p_tl, $q_tl) || strstr($p_lc, $q_lc) && $pg['visible'] == 1 ) { echo '
'; break; @@ -229,7 +241,10 @@ ?>