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