Removed sanity regex since there are too many random formats to track
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 12 Nov 2013 18:16:38 +0000 (10:16 -0800)
committerBryanDavis <bdavis@wikimedia.org>
Tue, 12 Nov 2013 20:08:17 +0000 (20:08 +0000)
Change-Id: I9da57ac5b59372324fbe0c627f012c638c88fca0

maintenance/cleanupUploadStash.php

index 2300694..d8bfd98 100644 (file)
@@ -119,13 +119,6 @@ class UploadStashCleanup extends Maintenance {
                }
                $i = 0;
                foreach ( $iterator as $file ) {
-                       // Absolute sanity check for stashed files and file segments
-                       $base = basename( $file );
-                       // @TODO: why are there thumbnails stored in here?
-                       if ( !preg_match( '#(^\d{14}!|\.\d+\.\w+\.\d+$|-\w{12}\.\w{6}\.\d+\.)#', $base ) ) {
-                               $this->output( "Skipped non-stash $file\n" );
-                               continue;
-                       }
                        if ( wfTimestamp( TS_UNIX, $tempRepo->getFileTimestamp( "$dir/$file" ) ) < $cutoff ) {
                                $status = $tempRepo->quickPurge( "$dir/$file" );
                                if ( !$status->isOK() ) {