Bsitu has uploaded a new change for review.
https://gerrit.wikimedia.org/r/92441
Change subject: Suppressed agent name should be hidden in API
......................................................................
Suppressed agent name should be hidden in API
bug: 56230
Change-Id: I7cac877ef0ff44a3f64828ae37ced874b720ad27
---
M api/ApiEchoNotifications.php
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/41/92441/1
diff --git a/api/ApiEchoNotifications.php b/api/ApiEchoNotifications.php
index a570b61..7ae381a 100644
--- a/api/ApiEchoNotifications.php
+++ b/api/ApiEchoNotifications.php
@@ -139,9 +139,15 @@
}
if ( $event->getAgent() ) {
+ if ( !$event->userCan( Revision::DELETED_USER,
$user ) ) {
+ $agentName = $this->msg(
'rev-deleted-user' )->escaped();
+ } else {
+ $agentName =
$event->getAgent()->getName();
+ }
+
$thisEvent['agent'] = array(
'id' => $event->getAgent()->getId(),
- 'name' => $event->getAgent()->getName(),
+ 'name' => $agentName,
);
}
--
To view, visit https://gerrit.wikimedia.org/r/92441
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cac877ef0ff44a3f64828ae37ced874b720ad27
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits