Merge "Add support for traits in ClassCollector"
[lhc/web/wiklou.git] / maintenance / purgeChangedFiles.php
index 1e702de..4f10b6e 100644 (file)
@@ -2,7 +2,6 @@
 /**
  * Scan the logging table and purge affected files within a timeframe.
  *
- * @section LICENSE
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -62,7 +61,7 @@ class PurgeChangedFiles extends Maintenance {
 
        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 (' .
@@ -167,7 +166,6 @@ class PurgeChangedFiles extends Maintenance {
 
                                // 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
@@ -192,7 +190,6 @@ class PurgeChangedFiles extends Maintenance {
                                                $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" );
                                        }
                                }