Merge "Introduce new hook UploadVerifyUpload to allow preventing file uploads"
[lhc/web/wiklou.git] / maintenance / importImages.php
index f0c6569..c653a5f 100644 (file)
@@ -36,6 +36,12 @@ $optionsWithArgs = [
        'extensions', 'comment', 'comment-file', 'comment-ext', 'summary', 'user',
        'license', 'sleep', 'limit', 'from', 'source-wiki-url', 'timestamp',
 ];
+
+$optionsWithoutArgs = [
+       'protect', 'unprotect', 'search-recursively', 'check-userblock', 'overwrite',
+       'skip-dupes', 'dry'
+];
+
 require_once __DIR__ . '/commandLine.inc';
 require_once __DIR__ . '/importImages.inc';
 $processed = $added = $ignored = $skipped = $overwritten = $failed = 0;
@@ -251,7 +257,7 @@ if ( $count > 0 ) {
                        $archive = $image->publish( $file, $flags, $publishOptions );
                        if ( !$archive->isGood() ) {
                                echo "failed. (" .
-                                       $archive->getWikiText() .
+                                       $archive->getWikiText( false, false, 'en' ) .
                                        ")\n";
                                $failed++;
                                continue;