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
$stash->removeFileNoAuth( $key );
} catch ( UploadStashBadPathException $ex ) {
$this->output( "Failed removing stashed upload with key: $key\n" );
+ } catch ( UploadStashZeroLengthFileException $ex ) {
+ $this->output( "Failed removing stashed upload with key: $key\n" );
}
if ( $i % 100 == 0 ) {
$this->output( "$i\n" );
$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" );
}