* @todo document
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that rebuilds search index table from scratch.
* Populates the search index with content from all pages
*/
protected function populateSearchIndex() {
- global $wgContentHandlerUseDB;
-
$res = $this->db->select( 'page', 'MAX(page_id) AS count' );
$s = $this->db->fetchObject( $res );
$count = $s->count;
$searchindex = $this->db->tableName( 'searchindex' );
$this->output( "\nRebuild the index...\n" );
$sql = "ALTER TABLE $searchindex ADD FULLTEXT si_title (si_title), " .
- "ADD FULLTEXT si_text (si_text)";
+ "ADD FULLTEXT si_text (si_text)";
$this->db->query( $sql, __METHOD__ );
}
}
$maintClass = "RebuildTextIndex";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;