From cdbe6fee1f106bcd326a9ac45507258109d103f7 Mon Sep 17 00:00:00 2001 From: Reedy Date: Sun, 21 Oct 2012 15:14:10 +0100 Subject: [PATCH] When deleting old thumbnails, actually increment $i Change-Id: Ic213fed61959ab4d25bcd891c81df20e39cbc5f5 --- maintenance/cleanupUploadStash.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maintenance/cleanupUploadStash.php b/maintenance/cleanupUploadStash.php index 6afe9e11e0..dc03c349e4 100644 --- a/maintenance/cleanupUploadStash.php +++ b/maintenance/cleanupUploadStash.php @@ -70,7 +70,7 @@ class UploadStashCleanup extends Maintenance { array_push( $keys, $row->us_key ); } - $this->output( 'Removing ' . count($keys) . " file(s)...\n" ); + $this->output( 'Removing ' . count( $keys ) . " file(s)...\n" ); // this could be done some other, more direct/efficient way, but using // UploadStash's own methods means it's less likely to fall accidentally // out-of-date someday @@ -100,6 +100,7 @@ class UploadStashCleanup extends Maintenance { $this->output( "Deleting old thumbnails...\n" ); $i = 0; foreach ( $iterator as $file ) { + $i++; if ( wfTimestamp( TS_UNIX, $tempRepo->getFileTimestamp( "$dir/$file" ) ) < $cutoff ) { $tempRepo->quickPurge( "$dir/$file" ); } -- 2.20.1