includes/search.php
changeset 832 7152ca0a0ce9
parent 801 eb8b23f11744
child 945 c19242d13a49
--- a/includes/search.php	Mon Feb 16 16:04:54 2009 -0500
+++ b/includes/search.php	Mon Feb 16 16:17:25 2009 -0500
@@ -256,7 +256,7 @@
             // Is this search term present in the page's title? If so, give extra points
             preg_match("/^ns=$ns_list;pid=(.+)$/", $match, $piecesparts);
             $pathskey = $paths->nslist[ $piecesparts[1] ] . sanitize_page_id($piecesparts[2]);
-            if ( isset($paths->pages[$pathskey]) )
+            if ( isPage($pathskey) )
             {
               $test_func = ( $case_sensitive ) ? 'strstr' : 'stristr';
               if ( $test_func($paths->pages[$pathskey]['name'], $row['word']) || $test_func($paths->pages[$pathskey]['urlname_nons'], $row['word']) )
@@ -298,7 +298,7 @@
           // Is this search term present in the page's title? If so, give extra points
           preg_match("/^ns=$ns_list;pid=(.+)$/", $pages, $piecesparts);
           $pathskey = $paths->nslist[ $piecesparts[1] ] . sanitize_page_id($piecesparts[2]);
-          if ( isset($paths->pages[$pathskey]) )
+          if ( isPage($pathskey) )
           {
             $test_func = ( $case_sensitive ) ? 'strstr' : 'stristr';
             if ( $test_func($paths->pages[$pathskey]['name'], $row['word']) || $test_func($paths->pages[$pathskey]['urlname_nons'], $row['word']) )
@@ -397,7 +397,7 @@
         // Is this search term present in the page's title? If so, give extra points
         preg_match("/^ns=$ns_list;pid=(.+)$/", $id, $piecesparts);
         $pathskey = $paths->nslist[ $piecesparts[1] ] . sanitize_page_id($piecesparts[2]);
-        if ( isset($paths->pages[$pathskey]) )
+        if ( isPage($pathskey) )
         {
           $test_func = ( $case_sensitive ) ? 'strstr' : 'stristr';
           foreach ( array_merge($query_phrase['any'], $query_phrase['req']) as $term )