Deprecating: Consolidating `progressive` & `constructive` buttons
[lhc/web/wiklou.git] / maintenance / rebuildFileCache.php
index 4147491..21cd3a1 100644 (file)
@@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php';
 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' );
@@ -70,7 +70,7 @@ class RebuildFileCache extends Maintenance {
 
                $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
@@ -89,7 +89,7 @@ class RebuildFileCache extends Maintenance {
                $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