From e78603fc29577d963a5175e7069c6dbaf7463072 Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Tue, 21 Dec 2010 04:46:49 +0000 Subject: [PATCH] (bug 26379) Make the importImages.php maintenance script give useful error messages on failure. (as in pass along the errors generated from publish() ) --- RELEASE-NOTES | 1 + maintenance/importImages.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a682b9d68a..6ab0b93850 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -35,6 +35,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 19006) {{REVISIONUSER}} no longer acts like {{CURRENTUSER}} in some cases * (bug 16019) $wgArticlePath = "/$1" no longer breaks API edit/watch actions * (bug 18372) File types blacklisted by $wgFileBlacklist will no longer be shown as "Permitted file types" on the upload form +* (bug 26379) importImages.php gives more descriptive error message on failure. === API changes in 1.18 === * (bug 26339) Throw warning when truncating an overlarge API result diff --git a/maintenance/importImages.php b/maintenance/importImages.php index ff1e3e559c..cc713db0ce 100644 --- a/maintenance/importImages.php +++ b/maintenance/importImages.php @@ -212,7 +212,9 @@ if ( count( $args ) > 0 ) { } else { $archive = $image->publish( $file ); if ( !$archive->isGood() ) { - echo( "failed.\n" ); + echo( "failed. (" . + $archive->getWikiText() . + ")\n" ); $failed++; continue; } @@ -258,7 +260,7 @@ if ( count( $args ) > 0 ) { } } else { - echo( "failed.\n" ); + echo( "failed. (at recordUpload stage)\n" ); $svar = 'failed'; } -- 2.20.1