X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FimportImages.php;h=54fd4e2d88ded8a5655ae5d5f7ce5c20e64d3cfb;hb=12b65651c413df795ec5cc644e020b65c4d4f928;hp=cbbcf0f9e602aee2ce518785b272efd8f694e457;hpb=c4d81e6c1e3d3aef7a21fbd704a94965116afebd;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importImages.php b/maintenance/importImages.php index cbbcf0f9e6..54fd4e2d88 100644 --- a/maintenance/importImages.php +++ b/maintenance/importImages.php @@ -230,14 +230,14 @@ if ( $count > 0 ) { } else { $props = FSFile::getPropsFromPath( $file ); $flags = 0; - $options = array(); + $publishOptions = array(); $handler = MediaHandler::getHandler( $props['mime'] ); if ( $handler ) { - $options['headers'] = $handler->getStreamHeaders( $props['metadata'] ); + $publishOptions['headers'] = $handler->getStreamHeaders( $props['metadata'] ); } else { - $options['headers'] = array(); + $publishOptions['headers'] = array(); } - $archive = $image->publish( $file, $flags, $options ); + $archive = $image->publish( $file, $flags, $publishOptions ); if ( !$archive->isGood() ) { echo "failed. (" . $archive->getWikiText() . @@ -248,7 +248,7 @@ if ( $count > 0 ) { } $commentText = SpecialUpload::getInitialPageText( $commentText, $license ); - if ( !$summary ) { + if ( !isset( $options['summary'] ) ) { $summary = $commentText; }