includes/paths.php
changeset 296 a21faa57e6c6
parent 294 444c34a3886b
child 310 78cb09a23e69
equal deleted inserted replaced
295:53233b86e054 296:a21faa57e6c6
   757       }
   757       }
   758       else
   758       else
   759       {
   759       {
   760         $page = array('name' => dirtify_page_id($row['page_id']));
   760         $page = array('name' => dirtify_page_id($row['page_id']));
   761       }
   761       }
       
   762       // make sure the page is indexable
       
   763       if ( isset($page['visible']) )
       
   764       {
       
   765         if ( $page['visible'] == 0 )
       
   766         {
       
   767           // not indexable, just continue
       
   768           continue;
       
   769         }
       
   770       }
   762       $texts[(string)$row['page_idstring']] = $row['page_text'] . ' ' . $page['name'];
   771       $texts[(string)$row['page_idstring']] = $row['page_text'] . ' ' . $page['name'];
   763     }
   772     }
   764     if ( $verbose )
   773     if ( $verbose )
   765     {
   774     {
   766       ob_start();
   775       ob_start();
   817       return 'E: Can\'t find page metadata';
   826       return 'E: Can\'t find page metadata';
   818     }
   827     }
   819     $row = $db->fetchrow();
   828     $row = $db->fetchrow();
   820     $db->free_result();
   829     $db->free_result();
   821     $search = new Searcher();
   830     $search = new Searcher();
   822     $search->buildIndex(Array("ns={$namespace};pid={$page_id}"=>$row['page_text'] . ' ' . $this->pages[$idstring]['name']));
   831     // if the page shouldn't be indexed, send a blank set of strings to the indexing engine
       
   832     if ( $this->pages[$idstring]['visible'] == 0 )
       
   833     {
       
   834       $search->buildIndex(Array("ns={$namespace};pid={$page_id}"=>''));
       
   835     }
       
   836     else
       
   837     {
       
   838       $search->buildIndex(Array("ns={$namespace};pid={$page_id}"=>$row['page_text'] . ' ' . $this->pages[$idstring]['name']));
       
   839     }
   823     $new_index = $search->index;
   840     $new_index = $search->index;
   824     
   841     
   825     if ( ENANO_DBLAYER == 'MYSQL' )
   842     if ( ENANO_DBLAYER == 'MYSQL' )
   826     {
   843     {
   827       $keys = array_keys($search->index);
   844       $keys = array_keys($search->index);