Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/307531

Change subject: mw.UploadWizardDetails, mw.UploadWizardUpload: Use 
'amenableparser' to handle templates in error messages
......................................................................

mw.UploadWizardDetails, mw.UploadWizardUpload: Use 'amenableparser' to handle 
templates in error messages

Depends-On: I7e1a52a59a25befe4edb7b4f531d60a2615e8f90
Bug: T144237
Change-Id: Ib332c245e837528e2dcec0bee0c76b6195f379a7
---
M resources/mw.UploadWizardDetails.js
M resources/mw.UploadWizardUpload.js
2 files changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/31/307531/1

diff --git a/resources/mw.UploadWizardDetails.js 
b/resources/mw.UploadWizardDetails.js
index fabec03..2f01f34 100644
--- a/resources/mw.UploadWizardDetails.js
+++ b/resources/mw.UploadWizardDetails.js
@@ -955,7 +955,9 @@
                        }
 
                        if ( code === 'abusefilter-disallowed' || code === 
'abusefilter-warning' || code === 'spamblacklist' ) {
-                               promise = this.api.loadMessagesIfMissing( [ 
result.error.message.key ] );
+                               // 'amenableparser' will expand templates and 
parser functions server-side.
+                               // We still do the rest of wikitext parsing 
here (throught jqueryMsg).
+                               promise = this.api.loadMessagesIfMissing( [ 
result.error.message.key ], { amenableparser: true } );
                                this.recoverFromError( mw.message( 'api-error-' 
+ code, function () {
                                        promise.done( function () {
                                                mw.errorDialog( $( '<div>' 
).msg(
diff --git a/resources/mw.UploadWizardUpload.js 
b/resources/mw.UploadWizardUpload.js
index b01a1cd..5859345 100644
--- a/resources/mw.UploadWizardUpload.js
+++ b/resources/mw.UploadWizardUpload.js
@@ -189,7 +189,9 @@
                                        result.error.blacklisted.length
                                ];
                        } else if ( code === 'abusefilter-disallowed' || code 
=== 'abusefilter-warning' || code === 'spamblacklist' ) {
-                               promise = this.api.loadMessagesIfMissing( [ 
result.error.message.key ] );
+                               // 'amenableparser' will expand templates and 
parser functions server-side.
+                               // We still do the rest of wikitext parsing 
here (throught jqueryMsg).
+                               promise = this.api.loadMessagesIfMissing( [ 
result.error.message.key ], { amenableparser: true } );
                                info = [
                                        function () {
                                                promise.done( function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib332c245e837528e2dcec0bee0c76b6195f379a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to