Merge "mediawiki.special.upload: Show an error message on "|""
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 22 Jan 2018 01:35:34 +0000 (01:35 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 22 Jan 2018 01:35:34 +0000 (01:35 +0000)
1  2 
resources/src/mediawiki.special/mediawiki.special.upload.js

@@@ -61,7 -61,7 +61,7 @@@
  
                timeout: function () {
                        var $spinnerDestCheck, title;
 -                      if ( !ajaxUploadDestCheck || this.nameToCheck === '' ) {
 +                      if ( !ajaxUploadDestCheck || this.nameToCheck.trim() === '' ) {
                                return;
                        }
                        $spinnerDestCheck = $.createSpinner().insertAfter( '#wpDestFile' );
@@@ -71,7 -71,7 +71,7 @@@
                                formatversion: 2,
                                action: 'query',
                                // If title is empty, user input is invalid, the API call will produce details about why
-                               titles: title ? title.getPrefixedText() : this.nameToCheck,
+                               titles: [ title ? title.getPrefixedText() : this.nameToCheck ],
                                prop: 'imageinfo',
                                iiprop: 'uploadwarning',
                                errorformat: 'html',