Index: branches/MwEmbedStandAlone/modules/AddMedia/mw.UploadHandler.js |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | myUpload.setupForm( ); |
84 | 84 | } |
85 | 85 | |
86 | | - // Update the selecto to include pointer to upload handler |
| 86 | + // Update the selector to include pointer to upload handler |
87 | 87 | var selectorElement = $j( this.selector ).get( 0 ); |
88 | 88 | selectorElement[ 'uploadHandler' ] = myUpload; |
89 | 89 | }; |
— | — | @@ -140,8 +140,13 @@ |
141 | 141 | } else { |
142 | 142 | // Setup the default DialogInterface UI |
143 | 143 | 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 | + |
146 | 151 | // Setup ui uploadHandler pointer |
147 | 152 | this.ui.uploadHandler = this; |
148 | 153 | |