r78662 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78661‎ | r78662 | r78663 >
Date:04:46, 21 December 2010
Author:bawolff
Status:ok
Tags:
Comment:
(bug 26379) Make the importImages.php maintenance script give useful error
messages on failure. (as in pass along the errors generated from publish() )
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/maintenance/importImages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/importImages.php
@@ -212,7 +212,9 @@
213213 } else {
214214 $archive = $image->publish( $file );
215215 if ( !$archive->isGood() ) {
216 - echo( "failed.\n" );
 216+ echo( "failed. (" .
 217+ $archive->getWikiText() .
 218+ ")\n" );
217219 $failed++;
218220 continue;
219221 }
@@ -258,7 +260,7 @@
259261 }
260262
261263 } else {
262 - echo( "failed.\n" );
 264+ echo( "failed. (at recordUpload stage)\n" );
263265 $svar = 'failed';
264266 }
265267
Index: trunk/phase3/RELEASE-NOTES
@@ -35,6 +35,7 @@
3636 * (bug 19006) {{REVISIONUSER}} no longer acts like {{CURRENTUSER}} in some cases
3737 * (bug 16019) $wgArticlePath = "/$1" no longer breaks API edit/watch actions
3838 * (bug 18372) File types blacklisted by $wgFileBlacklist will no longer be shown as "Permitted file types" on the upload form
 39+* (bug 26379) importImages.php gives more descriptive error message on failure.
3940
4041 === API changes in 1.18 ===
4142 * (bug 26339) Throw warning when truncating an overlarge API result

Status & tagging log