r75086 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75085‎ | r75086 | r75087 >
Date:13:57, 20 October 2010
Author:hartman
Status:deferred
Tags:
Comment:
mwEmbed: Don't rewrite the description on "reupload". Fixes bug 25582.
Modified paths:
  • /branches/MwEmbedStandAlone/modules/AddMedia/mw.UploadHandler.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/AddMedia/mw.UploadHandler.js
@@ -82,7 +82,7 @@
8383 myUpload.setupForm( );
8484 }
8585
86 - // Update the selecto to include pointer to upload handler
 86+ // Update the selector to include pointer to upload handler
8787 var selectorElement = $j( this.selector ).get( 0 );
8888 selectorElement[ 'uploadHandler' ] = myUpload;
8989 };
@@ -140,8 +140,13 @@
141141 } else {
142142 // Setup the default DialogInterface UI
143143 this.ui = new mw.UploadDialogInterface();
144 - }
145 -
 144+ }
 145+
 146+ // Don't rewrite on reuploads
 147+ if( $j("[name='wpForReUpload']").val() ) {
 148+ this.rewriteDescriptionText = false;
 149+ }
 150+
146151 // Setup ui uploadHandler pointer
147152 this.ui.uploadHandler = this;
148153

Status & tagging log