public function __construct() {
parent::__construct();
- $this->mDescription = "Scan the logging table and purge files and thumbnails.";
+ $this->addDescription( 'Scan the logging table and purge files and thumbnails.' );
$this->addOption( 'starttime', 'Starting timestamp', true, true );
$this->addOption( 'endtime', 'Ending timestamp', true, true );
$this->addOption( 'type', 'Comma-separated list of types of changes to send purges for (' .
// Purge current version and any versions in oldimage table
$file->purgeCache();
- $file->purgeHistory();
if ( $logType === 'delete' ) {
// If there is an orphaned storage file... delete it
$target = $params['4::target'];
$targetFile = $repo->newFile( Title::makeTitle( NS_FILE, $target ) );
$targetFile->purgeCache();
- $targetFile->purgeHistory();
$this->verbose( "Purged file {$target}; move target @{$row->log_timestamp}.\n" );
}
}