r92467 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92466‎ | r92467 | r92468 >
Date:20:22, 18 July 2011
Author:neilk
Status:ok
Tags:
Comment:
partial fixes for error recovery on details page
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
@@ -736,11 +736,15 @@
737737 } else if ( result && result.upload.warnings ) {
738738 var warnings = result.upload.warnings;
739739 if ( warnings['was-deleted'] ) {
740 - _this.recoverFromError( _this.titleId, gM( 'mwe-upwiz-api-warning-was-deleted' ) );
 740+ _this.recoverFromError( _this.titleId, gM( 'mwe-upwiz-api-warning-was-deleted', _this.upload.title.toString() ) );
741741 } else if ( warnings['thumb'] ) {
742742 _this.recoverFromError( _this.titleId, gM( 'mwe-upwiz-error-title-thumbnail' ) );
743743 } else if ( warnings['bad-prefix'] ) {
744744 _this.recoverFromError( _this.titleId, gM( 'mwe-upwiz-error-title-senselessimagename' ) );
 745+ } else if ( warnings['exists'] ) {
 746+ _this.recoverFromError( _this.titleId, gM( 'mwe-upwiz-api-warning-exists', _this.upload.title.getUrl() ) );
 747+ } else if ( warnings['duplicate'] ) {
 748+ _this.showError( 'duplicate', gM( 'mwe-upwiz-upload-error-duplicate' ) );
745749 } else {
746750 var warningsKeys = [];
747751 $j.each( warnings, function( key, val ) {

Status & tagging log