Merge "Fix a bunch of call-time pass-by-reference errors"
[lhc/web/wiklou.git] / maintenance / purgeChangedFiles.php
index d21a296..4f10b6e 100644 (file)
@@ -61,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 (' .
@@ -166,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
@@ -191,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" );
                                        }
                                }