Page MenuHomePhabricator

Use Linker::userToolLinks when showing the IP that triggered the filter on Special:AbuseLog private details
Closed, ResolvedPublic

Description

Currently the IP is being displayed on plain text. It'd be good however if we could make user of Linker::userToolLinks ( $userId, $userText, true ) there so reviewing checkusers could have some links at hand there. Thanks.

Event Timeline

I'll see if I can create a patch to achieve this.

Daimona triaged this task as Medium priority.
Daimona added a subscriber: Daimona.

@MarcoAurelio I'll work on this. Just one question: what would be the wanted result? I mean, I'm thinking of displaying (in the IP field), the IP with Linker::userLink and then other links as you said. In this case, what should be done with the "user name" field above? Leave it as plain text? Put links there as well?

I didn't uploaded the following to Gerrit as I somewhat suspect it's all wrong, but here we go:

commit 2543799fa9501d81f20c972b15f69dd041660ed5
Author: MarcoAurelio <maurelio@tools.wmflabs.org>
Date:   Thu Mar 1 10:59:05 2018 +0100

    Print user tool links on AbuseFilter private details check
    
    Bug: T188600

diff --git a/includes/special/SpecialAbuseLog.php b/includes/special/SpecialAbuseLog.php
index c0a4f61..aefcdf7 100644
--- a/includes/special/SpecialAbuseLog.php
+++ b/includes/special/SpecialAbuseLog.php
@@ -673,6 +673,8 @@ class SpecialAbuseLog extends SpecialPage {
 
 		// IP address
 		$ip = $row->afl_ip === '' ? $this->msg( 'abusefilter-log-ip-not-available' ) : $row->afl_ip;
+		/* Get (talk|contribs|block) links for $afl_ip */
+		$ip = Linker::userToolLinks ( $afl_user, $afl_ip, true);
 		$output .=
 			Xml::tags( 'tr', null,
 				Xml::element( 'td',

Regards.

@MarcoAurelio I'll work on this.

Thank you.

Just one question: what would be the wanted result?

123.456.789 (talk | contribs | block) which I think it's what Linker::userToolLinks does.

My tiny patch is almost ready, I directly used getUserLink to provide the usual shape. That also adds a link with the IP itself. I'll upload the commit in a few minutes, could you please check it out to see if the result is as expected? Thanks.

Change 415543 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Add userLinks in private details page

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

My tiny patch is almost ready, I directly used getUserLink to provide the usual shape. That also adds a link with the IP itself. I'll upload the commit in a few minutes, could you please check it out to see if the result is as expected? Thanks.

Thank you. However I have no way to check that so I've added @Huji and Aaron S. to the patch. They'll be able to either test the change themselves or know the person who can do it for them :) Again, thanks.

Change 415543 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Add userLinks in private details page

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