From: Chad Horohoe Date: Mon, 22 Feb 2010 00:54:39 +0000 (+0000) Subject: Cleanup r62798: If you add a new param then document it, simplify check for --force X-Git-Tag: 1.31.0-rc.0~37660 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=ebb436022534e7ed88adea3e9b0bb0c0bb239e74;p=lhc%2Fweb%2Fwiklou.git Cleanup r62798: If you add a new param then document it, simplify check for --force --- diff --git a/maintenance/deleteArchivedFiles.php b/maintenance/deleteArchivedFiles.php index 3d8253fc9f..f5d1f27dba 100644 --- a/maintenance/deleteArchivedFiles.php +++ b/maintenance/deleteArchivedFiles.php @@ -30,6 +30,7 @@ class DeleteArchivedFiles extends Maintenance { parent::__construct(); $this->mDescription = "Deletes all archived images."; $this->addOption( 'delete', 'Perform the deletion' ); + $this->addOption( 'force', 'Force deletion of rows from filearchive' ); } public function execute() { @@ -37,10 +38,7 @@ class DeleteArchivedFiles extends Maintenance { $this->output( "Use --delete to actually confirm this script\n" ); return; } - $force = false; - if( $this->hasOption('force') ) { - $force = true; - } + $force = $this->hasOption( 'force '); # Data should come off the master, wrapped in a transaction $dbw = wfGetDB( DB_MASTER ); $dbw->begin();