Haritha28 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/264070
Change subject: Notification when account is blocked
......................................................................
Notification when account is blocked
Changes have been made accordingly in
the respective files so that the user
gets notification when the user is
been blocked
Bug: T100974
Change-Id: I15eb583e053d72fff211863d1efad3834ef8f21d
---
M Hooks.php
M i18n/en.json
M i18n/qqq.json
M includes/formatters/UserRightsPresentationModel.php
4 files changed, 9 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/70/264070/1
diff --git a/Hooks.php b/Hooks.php
index ec3ff9a..62aca3c 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -551,7 +551,7 @@
return true;
}
- if ( $add || $remove ) {
+ if ( $add || $remove } || $block) {
EchoEvent::create(
array(
'type' => 'user-rights',
@@ -559,7 +559,8 @@
'extra' => array(
'user' => $user->getID(),
'add' => $add,
- 'remove' => $remove
+ 'remove' => $remove,
+ 'block' => $block
),
'agent' => $performer,
)
diff --git a/i18n/en.json b/i18n/en.json
index 14144e1..0121341 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -86,7 +86,8 @@
"notification-user-rights": "Your user rights
[[Special:Log/rights/$1|were {{GENDER:$1|changed}}]] by [[User:$1|$1]]. $2.
[[Special:ListGroupRights|Learn more]]",
"notification-header-user-rights": "Your user rights were
{{GENDER:$2|changed}} by $1. $3.",
"notification-user-rights-add": "You are now a member of
{{PLURAL:$2|this group|these groups}}: $1",
- "notification-user-rights-remove": "You are no longer a member of
{{PLURAL:$2|this group|these groups}}: $1",
+ "ntoification-user-rights-block":"You have been blocked.",
+ "notification-user-rights-remove": "You are no longer a member of
{{PLURAL:$2|this group|these groups}}: $1",
"notification-new-user": "Welcome to {{SITENAME}}, $1! We're glad
you're here.",
"notification-header-welcome": "{{GENDER:$2|Welcome}} to {{SITENAME}},
$1! We're glad {{GENDER:$2|you're}} here.",
"notification-welcome-link": "",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 5e739b9..581f29d 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -107,7 +107,8 @@
"notification-user-rights": "Format for displaying notifications of a
user right change in notification page.\n\nParameters:\n* $1 - the username of
the person who made the user right change. Can be used for GENDER support.\n*
$2 - a semicolon separated list of {{msg-mw|Notification-user-rights-add}},
{{msg-mw|Notification-user-rights-remove}}",
"notification-header-user-rights": "Format for displaying notifications
of a user right change in notification flyout. Parameters:\n* $1 - the
username of the person who made the user right change, formatted for display.
Cannot be used for GENDER\n* $2 - the raw username of the person who made the
user rights change, can be used for GENDER support\n* $3 - a semicolon
separated list of {{msg-mw|notification-user-rights-add}},
{{msg-mw|notification-user-rights-remove}}",
"notification-user-rights-add": "Message indicating that a user was
added to a user group. Parameters:\n* $1 - a comma separated list of user
group names\n* $2 - the number of user groups, this is used for PLURAL
support\nSee also:\n* {{msg-mw|Notification-user-rights-remove}}",
- "notification-user-rights-remove": "Message indicating that a user was
removed from a user group. Parameters:\n* $1 - a comma separated list of user
group names\n* $2 - the number of user groups, this is used for PLURAL
support\nSee also:\n* {{msg-mw|Notification-user-rights-add}}",
+ "notification-user-rights-block":"Message indicating that a user has
been blocked from a user group.",
+ "notification-user-rights-remove": "Message indicating that a user was
removed from a user group. Parameters:\n* $1 - a comma separated list of user
group names\n* $2 - the number of user groups, this is used for PLURAL
support\nSee also:\n* {{msg-mw|Notification-user-rights-add}}",
"notification-new-user": "Text of the welcome notification.
Parameters:\n* $1 - the name of the new user\nSee also:\n*
{{msg-mw|Guidedtour-tour-gettingstarted-start-title}}",
"notification-header-welcome": "Text of the welcome notification.
Parameters:\n* $1 - the name of the new user.Parameters:\n* $1 - the formatted
username of the new user\n* $2 - the username for gender purposes\nSee also:\n*
{{msg-mw|Guidedtour-tour-gettingstarted-start-title}}",
"notification-welcome-link": "{{notranslate}}",
diff --git a/includes/formatters/UserRightsPresentationModel.php
b/includes/formatters/UserRightsPresentationModel.php
index fdf563f..ac4b06f 100644
--- a/includes/formatters/UserRightsPresentationModel.php
+++ b/includes/formatters/UserRightsPresentationModel.php
@@ -23,7 +23,7 @@
private function getChangedGroups() {
$list = array();
$extra = $this->event->getExtra();
- foreach ( array( 'add', 'remove' ) as $action ) {
+ foreach ( array( 'add', 'remove', 'block' ) as $action ) {
if ( isset( $extra[$action] ) && $extra[$action] ) {
// Get the localized group names, bug 55338
@@ -36,6 +36,7 @@
// Messages that can be used here:
// * notification-user-rights-add
// * notification-user-rights-remove
+ // * notification-user-rights-block
$list[] = $this->msg(
'notification-user-rights-' . $action )
->params( $this->language->commaList(
$groups ), count( $groups ) )
->text();
--
To view, visit https://gerrit.wikimedia.org/r/264070
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I15eb583e053d72fff211863d1efad3834ef8f21d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Haritha28 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits