From: Brian Wolff Date: Tue, 21 Dec 2010 04:46:49 +0000 (+0000) Subject: (bug 26379) Make the importImages.php maintenance script give useful error X-Git-Tag: 1.31.0-rc.0~33222 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=e78603fc29577d963a5175e7069c6dbaf7463072;p=lhc%2Fweb%2Fwiklou.git (bug 26379) Make the importImages.php maintenance script give useful error messages on failure. (as in pass along the errors generated from publish() ) --- 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'; }