From: Fomafix Date: Sun, 21 Jan 2018 14:41:30 +0000 (+0100) Subject: mediawiki.special.upload: Show an error message on "|" X-Git-Tag: 1.31.0-rc.0~842^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=55d3072697ce3e764de4ceff712bc0bdf4cb7a45;p=lhc%2Fweb%2Fwiklou.git mediawiki.special.upload: Show an error message on "|" This change prevents that "|" is interpreted as title separator and shows the following message when the title contains a "|" character: The requested page title contains invalid characters: "|". Before this change the following message is shown on this case: The requested page title is empty or contains only the name of a namespace. Change-Id: If67ed573ea0b5c28c59a7d90e8581c4b67528450 --- diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js b/resources/src/mediawiki.special/mediawiki.special.upload.js index 9bf62558dd..c46d2e69c2 100644 --- a/resources/src/mediawiki.special/mediawiki.special.upload.js +++ b/resources/src/mediawiki.special/mediawiki.special.upload.js @@ -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',