From: Aaron Schulz Date: Wed, 6 Nov 2013 20:47:49 +0000 (-0800) Subject: Catch temp container thumbnails in cleanup script X-Git-Tag: 1.31.0-rc.0~18264^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22lang_raccourcis%22%2C%22module=%24nom_module%22%29%20.%20%22?a=commitdiff_plain;h=2d083797dbf7517575c436653e27855012d44eb4;p=lhc%2Fweb%2Fwiklou.git Catch temp container thumbnails in cleanup script Change-Id: Iba2badac3abf08e5c4a409ccf10d831e0e9b341e --- diff --git a/maintenance/cleanupUploadStash.php b/maintenance/cleanupUploadStash.php index ba7c3cf60e..bc43c6760b 100644 --- a/maintenance/cleanupUploadStash.php +++ b/maintenance/cleanupUploadStash.php @@ -120,7 +120,9 @@ class UploadStashCleanup extends Maintenance { $i = 0; foreach ( $iterator as $file ) { // Absolute sanity check for stashed files and file segments - if ( !preg_match( '#(^\d{14}!|\.\d+\.\w+\.\d+$)#', basename( $file ) ) ) { + $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; }