class RebuildFileCache extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = "Build file cache for content pages";
+ $this->addDescription( 'Build file cache for content pages' );
$this->addOption( 'start', 'Page_id to start from', false, true );
$this->addOption( 'end', 'Page_id to end on', false, true );
$this->addOption( 'overwrite', 'Refresh page cache' );
$this->output( "Building content page file cache from page {$start}!\n" );
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = $this->getDB( DB_SLAVE );
$overwrite = $this->getOption( 'overwrite', false );
$start = ( $start > 0 )
? $start
$blockStart = $start;
$blockEnd = $start + $this->mBatchSize - 1;
- $dbw = wfGetDB( DB_MASTER );
+ $dbw = $this->getDB( DB_MASTER );
// Go through each page and save the output
while ( $blockEnd <= $end ) {
// Get the pages