Merge "Add .sass-cache to .gitignore"
[lhc/web/wiklou.git] / maintenance / importImages.php
index 9b0a290..54fd4e2 100644 (file)
@@ -35,8 +35,8 @@ $optionsWithArgs = array(
        'extensions', 'comment', 'comment-file', 'comment-ext', 'summary', 'user',
        'license', 'sleep', 'limit', 'from', 'source-wiki-url', 'timestamp',
 );
-require_once( __DIR__ . '/commandLine.inc' );
-require_once( __DIR__ . '/importImages.inc' );
+require_once __DIR__ . '/commandLine.inc';
+require_once __DIR__ . '/importImages.inc';
 $processed = $added = $ignored = $skipped = $overwritten = $failed = 0;
 
 echo "Import Images\n\n";
@@ -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;
                }