r77450 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77449‎ | r77450 | r77451 >
Date:02:06, 30 November 2010
Author:neilk
Status:ok
Tags:
Comment:
check thumbnail a bit more carefully
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
@@ -234,6 +234,10 @@
235235 var thumbnails = data.query.stashimageinfo;
236236 for ( var i = 0; i < thumbnails.length; i++ ) {
237237 var thumb = thumbnails[i];
 238+ if ( ! ( thumb.thumburl && thumb.thumbwidth && thumb.thumbheight ) ) {
 239+ mw.log( "thumbnail missing information" );
 240+ // XXX error
 241+ }
238242 var image = document.createElement( 'img' );
239243 $j( image ).load( function() {
240244 callback( image );

Status & tagging log