MediaWiki
REL1_19
|
00001 <?php 00002 00026 require_once( dirname( __FILE__ ) . '/Maintenance.php' ); 00027 require_once( dirname( __FILE__ ) . '/deleteArchivedFiles.inc' ); 00028 00029 class DeleteArchivedFiles extends Maintenance { 00030 public function __construct() { 00031 parent::__construct(); 00032 $this->mDescription = "Deletes all archived images."; 00033 $this->addOption( 'delete', 'Perform the deletion' ); 00034 $this->addOption( 'force', 'Force deletion of rows from filearchive' ); 00035 } 00036 00037 public function handleOutput( $str ) { 00038 return $this->output( $str ); 00039 } 00040 00041 public function execute() { 00042 if ( !$this->hasOption( 'delete' ) ) { 00043 $this->output( "Use --delete to actually confirm this script\n" ); 00044 return; 00045 } 00046 $force = $this->hasOption( 'force' ); 00047 DeleteArchivedFilesImplementation::doDelete( $this, $force ); 00048 } 00049 } 00050 00051 $maintClass = "DeleteArchivedFiles"; 00052 require_once( RUN_MAINTENANCE_IF_MAIN );