Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405589 )

Change subject: mediawiki.special.upload: Show an error message on "|"
......................................................................

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
---
M resources/src/mediawiki.special/mediawiki.special.upload.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/89/405589/1

diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js 
b/resources/src/mediawiki.special/mediawiki.special.upload.js
index 9bf6255..c46d2e6 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',

-- 
To view, visit https://gerrit.wikimedia.org/r/405589
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If67ed573ea0b5c28c59a7d90e8581c4b67528450
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Fomafix <foma...@googlemail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to