r96262 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96261‎ | r96262 | r96263 >
Date:21:52, 4 September 2011
Author:jeroendedauw
Status:ok (Comments)
Tags:
Comment:
changed placement of id field wikitext on request by multichill
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
@@ -745,7 +745,16 @@
746746 }
747747 $j.each( _this.descriptions, function( i, desc ) {
748748 information['description'] += desc.getWikiText();
749 - } );
 749+ } );
 750+
 751+ // Add id field if needed
 752+ if ( mw.UploadWizard.config.idField != '' ) {
 753+ var idFieldValue = $j.trim( $j( _this.idFieldInput ).val() );
 754+
 755+ if ( ! mw.isEmpty( idFieldValue ) ) { // HAXXX
 756+ information['description'] += mw.UploadWizard.config.idField.replace( '$1', idFieldValue );
 757+ }
 758+ }
750759
751760 information['date'] = $j.trim( $j( _this.dateInput ).val() );
752761
@@ -780,15 +789,6 @@
781790 wikiText += mw.UploadWizard.config.autoWikiText;
782791 }
783792
784 - // Add id field if needed
785 - if ( mw.UploadWizard.config.idField != '' ) {
786 - var idFieldValue = $j.trim( $j( _this.idFieldInput ).val() );
787 -
788 - if ( ! mw.isEmpty( idFieldValue ) ) { // HAXXX
789 - wikiText += mw.UploadWizard.config.idField.replace( '$1', idFieldValue ) + "\n\n";
790 - }
791 - }
792 -
793793 // add categories
794794 wikiText += _this.div.find( '.categoryInput' ).get(0).getWikiText() + "\n\n";
795795

Comments

#Comment by Multichill (talk | contribs)   21:53, 4 September 2011

Thank you Jeroen!

Status & tagging log