From df25bdbbea8c6b1586f4652c013cf87d8e7dac17 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 18 Aug 2009 22:03:57 +0000 Subject: [PATCH] Quick hack workaround for lack of optional argument lists in Maintenance class: * don't list the start argument (good: means we default to 0; bad: means the --help doesn't list it) * use "0" rather than 0 as the default so it doesn't fail the ctype_digit check --- maintenance/rebuildFileCache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php index f069b2fbff..0173726915 100644 --- a/maintenance/rebuildFileCache.php +++ b/maintenance/rebuildFileCache.php @@ -26,7 +26,7 @@ class RebuildFileCache extends Maintenance { public function __construct() { parent::__construct(); $this->mDescription = "Build file cache for content pages"; - $this->addArgs( array( 'start' ) ); + //$this->addArgs( array( 'start' ) ); $this->addOption( '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 ); } -- 2.20.1