Fix script for bug 20757.
[lhc/web/wiklou.git] / maintenance / rebuildFileCache.php
index f069b2f..2a4e488 100644 (file)
@@ -26,8 +26,8 @@ class RebuildFileCache extends Maintenance {
        public function __construct() {
                parent::__construct();
                $this->mDescription = "Build file cache for content pages";
-               $this->addArgs( array( 'start' ) );
-               $this->addOption( 'overwrite', 'Refresh page cache', false );
+               $this->addArg( 'start', 'Page_id to start from', true );
+               $this->addArg( 'overwrite', 'Refresh page cache', false );
                $this->setBatchSize( 100 );
        }
 
@@ -38,7 +38,7 @@ class RebuildFileCache extends Maintenance {
                        $this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true );
                }
                $wgDisableCounters = false;
-               $start = $this->getArg( 0, 0 );
+               $start = $this->getArg( 0, "0" );
                if( !ctype_digit($start) ) {
                        $this->error( "Invalid value for start parameter.", true );
                }