jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374851 )

Change subject: The link from CU log to CU and vice versa should preload the 
target
......................................................................


The link from CU log to CU and vice versa should preload the target

Bug: T174588
Change-Id: I8871ee82c7ee158d88cb1524e2d3daf1d98b6b2d
---
M i18n/en.json
M i18n/qqq.json
M specials/SpecialCheckUser.php
M specials/SpecialCheckUserLog.php
4 files changed, 19 insertions(+), 3 deletions(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  Melos: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/i18n/en.json b/i18n/en.json
index ce5d335..5e5e3ac 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -39,6 +39,8 @@
        "checkuser-nomatch": "No matches found.",
        "checkuser-nomatch-edits": "No matches found.\nLast edit was on $1 at 
$2.",
        "checkuser-check": "Check",
+       "checkuser-check-this-user": "Check this user",
+       "checkuser-recent-checks": "Recent checks for this user",
        "checkuser-log-fail": "Unable to add log entry",
        "checkuser-nolog": "No log file found.",
        "checkuser-blocked": "Blocked",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 0906ac3..01a3d75 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -60,6 +60,8 @@
        "checkuser-nomatch": "Used in [[Special:CheckUser]].\n\nSee also:\n* 
{{msg-mw|Checkuser-nomatch-edits}}",
        "checkuser-nomatch-edits": "Parameters:\n* $1 - date, localized\n* $2 - 
time, localized\nSee also:\n* {{msg-mw|Checkuser-nomatch}}",
        "checkuser-check": "Button label on CheckUser Special page. See 
screenshot '[[mw:Extension:CheckUser#Basic_interface|Basic CheckUser 
interface]]'.\n\nAlso appears to be used as link to new CheckUser check from 
the results page of a CheckUser check - see screenshot \"Example IP 
check\".\n{{Identical|Check}}",
+       "checkuser-check-this-user": "Label for the link shown in the subtitle",
+       "checkuser-recent-checks": "Label for the link shown in the subtitle",
        "checkuser-log-fail": "Used as failure message in 
[[Special:CheckUser]].",
        "checkuser-nolog": "Unused at this time.",
        "checkuser-blocked": "Used as link text in 
[[Special:CheckUser]].\n\nThe link points to [[Special:Log]] or 
[[Special:BlockList]].\n\nSee also:\n* {{msg-mw|Checkuser-gblocked}}\n* 
{{msg-mw|Checkuser-wasblocked}}\n{{Identical|Blocked}}",
diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php
index cfc006d..a511114 100644
--- a/specials/SpecialCheckUser.php
+++ b/specials/SpecialCheckUser.php
@@ -28,17 +28,23 @@
 
                $out = $this->getOutput();
                $request = $this->getRequest();
+               $user = $request->getText( 'user', $request->getText( 'ip', 
$subpage ) );
+               $user = trim( $user );
 
                if ( $this->getUser()->isAllowed( 'checkuser-log' ) ) {
                        $subtitleLink = $this->getLinkRenderer()->makeKnownLink(
                                SpecialPage::getTitleFor( 'CheckUserLog' ),
                                $this->msg( 'checkuser-showlog' )->text()
                        );
+                       if ( !$user === false ) {
+                               $subtitleLink .= ' | ' . 
$this->getLinkRenderer()->makeKnownLink(
+                                       SpecialPage::getTitleFor( 
'CheckUserLog', $user ),
+                                       $this->msg( 'checkuser-recent-checks' 
)->text()
+                               );
+                       }
                        $out->addSubtitle( $subtitleLink );
                }
 
-               $user = $request->getText( 'user', $request->getText( 'ip', 
$subpage ) );
-               $user = trim( $user );
                $reason = $request->getText( 'reason' );
                $blockreason = $request->getText( 'blockreason', '' );
                $disableUserTalk = $request->getBool( 'blocktalk', false );
diff --git a/specials/SpecialCheckUserLog.php b/specials/SpecialCheckUserLog.php
index 33bb29f..011c195 100644
--- a/specials/SpecialCheckUserLog.php
+++ b/specials/SpecialCheckUserLog.php
@@ -16,16 +16,22 @@
 
                $out = $this->getOutput();
                $request = $this->getRequest();
+               $this->target = trim( $request->getVal( 'cuSearch', $par ) );
 
                if ( $this->getUser()->isAllowed( 'checkuser' ) ) {
                        $subtitleLink = $this->getLinkRenderer()->makeKnownLink(
                                SpecialPage::getTitleFor( 'CheckUser' ),
                                $this->msg( 'checkuser-showmain' )->text()
                        );
+                       if ( !$this->target === false ) {
+                               $subtitleLink .= ' | ' . 
$this->getLinkRenderer()->makeKnownLink(
+                                       SpecialPage::getTitleFor( 'CheckUser', 
$this->target ),
+                                       $this->msg( 'checkuser-check-this-user' 
)->text()
+                               );
+                       }
                        $out->addSubtitle( $subtitleLink );
                }
 
-               $this->target = trim( $request->getVal( 'cuSearch', $par ) );
                $type = $request->getVal( 'cuSearchType', 'target' );
 
                $this->displaySearchForm();

-- 
To view, visit https://gerrit.wikimedia.org/r/374851
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8871ee82c7ee158d88cb1524e2d3daf1d98b6b2d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CheckUser
Gerrit-Branch: master
Gerrit-Owner: Huji <[email protected]>
Gerrit-Reviewer: Huji <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: Melos <[email protected]>
Gerrit-Reviewer: MusikAnimal <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Zoranzoki21 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to