--- a/includes/paths.php Fri May 09 23:33:11 2008 -0400
+++ b/includes/paths.php Thu Jun 12 10:58:48 2008 -0400
@@ -759,6 +759,15 @@
{
$page = array('name' => dirtify_page_id($row['page_id']));
}
+ // make sure the page is indexable
+ if ( isset($page['visible']) )
+ {
+ if ( $page['visible'] == 0 )
+ {
+ // not indexable, just continue
+ continue;
+ }
+ }
$texts[(string)$row['page_idstring']] = $row['page_text'] . ' ' . $page['name'];
}
if ( $verbose )
@@ -819,7 +828,15 @@
$row = $db->fetchrow();
$db->free_result();
$search = new Searcher();
- $search->buildIndex(Array("ns={$namespace};pid={$page_id}"=>$row['page_text'] . ' ' . $this->pages[$idstring]['name']));
+ // if the page shouldn't be indexed, send a blank set of strings to the indexing engine
+ if ( $this->pages[$idstring]['visible'] == 0 )
+ {
+ $search->buildIndex(Array("ns={$namespace};pid={$page_id}"=>''));
+ }
+ else
+ {
+ $search->buildIndex(Array("ns={$namespace};pid={$page_id}"=>$row['page_text'] . ' ' . $this->pages[$idstring]['name']));
+ }
$new_index = $search->index;
if ( ENANO_DBLAYER == 'MYSQL' )