r96154 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96153‎ | r96154 | r96155 >
Date:22:08, 2 September 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r96103
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.config.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.i18n.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/UploadWizard/includes/UploadWizardCampaign.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/UploadWizard/resources/mw.UploadWizardDetails.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.config.php
@@ -65,6 +65,9 @@
6666 // Overrides idFieldLabel when set. $1 is replaced by the language code.
6767 'idFieldLabelPage' => '',
6868
 69+ // The maximum length of the id field.
 70+ 'idFieldMaxLength' => 25,
 71+
6972 // 'licenses' is a list of licenses you could possibly use elsewhere, for instance in
7073 // licensesOwnWork or licensesThirdParty.
7174 // It just describes what licenses go with what wikitext, and how to display them in
Index: branches/wmf/1.17wmf1/extensions/UploadWizard/includes/UploadWizardCampaign.php
@@ -177,7 +177,10 @@
178178 'idFieldLabelPage' => array(
179179 'type' => 'text',
180180 ),
181 - 'ownWorkOption' => array(
 181+ 'idFieldMaxLength' => array(
 182+ 'type' => 'int',
 183+ ),
 184+ 'ownWorkOption' => array(
182185 'type' => 'radio',
183186 'options' => array(
184187 wfMsg( 'mwe-upwiz-campaign-owner-choice' ) => 'choice',
Index: branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.i18n.php
@@ -338,6 +338,7 @@
339339 'mwe-upwiz-campaign-conf-idFieldLabelPage' => 'Page name with text for the ID field label. $1 is replaced with the language code:',
340340 'mwe-upwiz-campaign-conf-headerLabelPage' => 'Page containing text to display above the UploadWizard interface. $1 is replaced with the language code:',
341341 'mwe-upwiz-campaign-conf-thanksLabelPage' => 'Page containing text to display on top of the "Use" page. $1 is replaced with the language code:',
 342+ 'mwe-upwiz-campaign-conf-idFieldMaxLength' => 'Maximum length of the text in the ID field',
342343
343344 // Coolcats
344345 'mw-coolcats-confirm-new-title' => 'Confirm new category',
Index: branches/wmf/1.17wmf1/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
@@ -178,7 +178,13 @@
179179
180180 if ( mw.UploadWizard.config.idField != '' ) {
181181 var idFieldId = "idField" + ( _this.upload.index ).toString();
182 - _this.idFieldInput = $j( '<input type="text" id="' + idFieldId + '" name="' + idFieldId + '" class="mwe-idfield" maxlength="15"/>' );
 182+ _this.idFieldInput = $j( '<input />' ).attr( {
 183+ 'type': 'text',
 184+ 'id': idFieldId,
 185+ 'name': idFieldId,
 186+ 'class': 'mwe-idfield',
 187+ 'maxlength': mw.UploadWizard.config.idFieldMaxLength
 188+ } );
183189
184190 _this.$form.append(
185191 $j( '<div class="mwe-upwiz-details-input-error"><label class="mwe-validator-error" for="' + idFieldId + '" generated="true"/></div>' ),

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96103made max len of id field configurable; fix bug 30696jeroendedauw15:32, 2 September 2011

Status & tagging log