X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FimportImages.php;h=e733b9a7df692b3cdb7f597d8f53095472f0b8b3;hb=ade84360512e737f566f05c6c96d461465878bc3;hp=d3967037c62149a6628ad27fd597940922534ba0;hpb=0812c5e35428e370c69c95da7bc5a152a058f660;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importImages.php b/maintenance/importImages.php index d3967037c6..e733b9a7df 100644 --- a/maintenance/importImages.php +++ b/maintenance/importImages.php @@ -185,9 +185,7 @@ class ImportImages extends Maintenance { # Batch "upload" operation $count = count( $files ); if ( $count > 0 ) { - foreach ( $files as $file ) { - if ( $sleep && ( $processed > 0 ) ) { sleep( $sleep ); } @@ -309,9 +307,7 @@ class ImportImages extends Maintenance { if ( $handler ) { $metadata = MediaWiki\quietCall( 'unserialize', $props['metadata'] ); - $publishOptions['headers'] = $handler->getContentHeaders( - $metadata, $props['width'], $props['height'] - ); + $publishOptions['headers'] = $handler->getContentHeaders( $metadata ); } else { $publishOptions['headers'] = []; } @@ -338,7 +334,7 @@ class ImportImages extends Maintenance { $commentText, $props, $timestamp - ) ) { + )->isOK() ) { # We're done! $this->output( "done.\n" );