Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/296360
Change subject: Add message parameters to API response
......................................................................
Add message parameters to API response
We previously added the message key as .message property
(97b433286dc086ea5261b1b88736600b5454887f), leaving it for the API
client to know what the parameters are and how to get them.
(Here, the parameters are the .line property and the page title.)
Let's just do this work for the client, so that it doesn't have to
know what TitleBlacklist it - it'll be able to just display the given
message with the given parameters. My specific use case is the upload
dialog in core (core shouldn't have to know about any extensions).
See also AbuseFilter change I0a88fc3dbf08313fae64c07b32abe2e5c8e9ef22.
Change-Id: I97c1f5c6bbbdfc0b8ea9914bb075d5299c14df8f
---
M AbuseFilter.hooks.php
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter
refs/changes/60/296360/1
diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php
index e9fdd25..5910330 100644
--- a/AbuseFilter.hooks.php
+++ b/AbuseFilter.hooks.php
@@ -182,6 +182,7 @@
return array(
'code' => $code,
'message' => $key,
+ 'messageParams' => $msg,
'abusefilter' => array(
'id' => $filter,
'description' => $filterDescription,
--
To view, visit https://gerrit.wikimedia.org/r/296360
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I97c1f5c6bbbdfc0b8ea9914bb075d5299c14df8f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits