jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  MarkTraceur: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: Ib332c245e837528e2dcec0bee0c76b6195f379a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoƄski <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to