X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportImages.php;h=0c4ff0af50247d514bd4e5e0c3a0b11eac6c7f28;hb=b450bf0bd6551ec8f6a7c054d6e66b29cb71e43d;hp=d0d8a4b5cd5325408d70715edf78e2b52c3e7aa5;hpb=e3e33ce99c909103b4b2b861c8361729441eccc8;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importImages.php b/maintenance/importImages.php index d0d8a4b5cd..0c4ff0af50 100644 --- a/maintenance/importImages.php +++ b/maintenance/importImages.php @@ -200,7 +200,8 @@ class ImportImages extends Maintenance { $title = Title::makeTitleSafe( NS_FILE, $base ); if ( !is_object( $title ) ) { $this->output( - "{$base} could not be imported; a valid title cannot be produced\n" ); + "{$base} could not be imported; a valid title cannot be produced\n" + ); continue; } @@ -246,7 +247,8 @@ class ImportImages extends Maintenance { if ( $dupes ) { $this->output( - "{$base} already exists as {$dupes[0]->getName()}, skipping\n" ); + "{$base} already exists as {$dupes[0]->getName()}, skipping\n" + ); $skipped++; continue; } @@ -274,7 +276,8 @@ class ImportImages extends Maintenance { if ( $wgUser === false ) { # user does not exist in target wiki $this->output( - "failed: user '$real_user' does not exist in target wiki." ); + "failed: user '$real_user' does not exist in target wiki." + ); continue; } } @@ -291,7 +294,8 @@ class ImportImages extends Maintenance { $commentText = file_get_contents( $f ); if ( !$commentText ) { $this->output( - " Failed to load comment file {$f}, using default comment. " ); + " Failed to load comment file {$f}, using default comment. " + ); } } } @@ -322,7 +326,7 @@ class ImportImages extends Maintenance { $archive = $image->publish( $file, $flags, $publishOptions ); if ( !$archive->isGood() ) { $this->output( "failed. (" . - $archive->getWikiText( false, false, 'en' ) . + $archive->getMessage( false, false, 'en' )->text() . ")\n" ); $failed++; continue;