* @todo document
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that rebuilds search index table from scratch.
}
public function execute() {
- global $wgTitle;
-
// Shouldn't be needed for Postgres
$this->db = wfGetDB( DB_MASTER );
if ( $this->db->getType() == 'postgres' ) {
}
}
- $wgTitle = Title::newFromText( "Rebuild text index script" );
-
if ( $this->db->getType() == 'mysql' ) {
$this->dropMysqlTextIndex();
$this->populateSearchIndex();
$rev = new Revision( $s );
$content = $rev->getContent();
- $text = $content->getTextForSearchIndex();
- $u = new SearchUpdate( $s->page_id, $title, $text );
+ $u = new SearchUpdate( $s->page_id, $title, $content );
$u->doUpdate();
} catch ( MWContentSerializationException $ex ) {
$this->output( "Failed to deserialize content of revision {$s->rev_id} of page "