r105441 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105440‎ | r105441 | r105442 >
Date:17:03, 7 December 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
fix off by one error from bug 31341 and error message tweaks
Modified paths:
  • /trunk/extensions/UploadWizard/UploadWizard.i18n.php (modified) (history)
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardUpload.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/UploadWizard.i18n.php
@@ -215,7 +215,7 @@
216216 'mwe-upwiz-error-license-wikitext-invalid' => 'This does not seem to be valid wikitext, or does not contain a license.',
217217 'mwe-upwiz-details-error-count' => 'There {{PLURAL:$1|is one error|are $1 errors}} with the {{PLURAL:$2|form|forms}} above. Correct the errors, and try submitting again.',
218218 'mwe-upwiz-too-many-files-ok' => 'OK',
219 - 'mwe-upwiz-too-many-files-text' => 'You can only upload $1 {{PLURAL:$1|file|files}} at once. You tried to add $2 {{PLURAL:$2|file|files}}, so $3 {{PLURAL:$3|file|files}} have been removed.',
 219+ 'mwe-upwiz-too-many-files-text' => 'You can only upload $1 {{PLURAL:$1|file|files}} at once. You tried to upload $2 {{PLURAL:$2|file|files}} in total, so $3 {{PLURAL:$3|file has|files have}} been removed.',
220220 'mwe-upwiz-too-many-files' => 'Too many files.',
221221
222222 /* LICENSES & combinations of licenses */
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardUpload.js
@@ -339,7 +339,7 @@
340340 if ( tooManyFiles ) {
341341 var remainingFiles = mw.UploadWizard.config[ 'maxUploads' ] - _this.wizard.uploads.length;
342342 _this.showTooManyFilesWarning( files.length - remainingFiles );
343 - var files = remainingFiles > 1 ? files.slice( 1, remainingFiles - 1 ) : [];
 343+ var files = remainingFiles > 1 ? files.slice( 1, remainingFiles ) : [];
344344 }
345345 else {
346346 var files = files.slice( 1 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104103fixing bug 31341 - maybe not the most elegant solution, but it worksjeroendedauw23:37, 23 November 2011
r104167bug 31341, follow up to r104117jeroendedauw14:44, 24 November 2011

Status & tagging log