EddieGP has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/344811 )
Change subject: Show "change block" in userlinks for blocked users
......................................................................
Show "change block" in userlinks for blocked users
User links are used on various special pages. Currently, if one user is
blocked, it will still say (talk | contribs | block). After this patch
it'll be (talk | contribs | change block ) if the user is already
blocked. The necessary message is already in use on other places, hence
another translation message isn't needed.
Bug: T24705
Change-Id: I85f8ad1133ed6085220bc35ba99b73cf8a489fd0
---
M includes/Linker.php
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/11/344811/1
diff --git a/includes/Linker.php b/includes/Linker.php
index 0c8d1c6..fbcbb88 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -1002,9 +1002,11 @@
*/
public static function blockLink( $userId, $userText ) {
$blockPage = SpecialPage::getTitleFor( 'Block', $userText );
+ $message = User::newFromId( $userId )->isBlocked() ?
+ 'change-blocklink' : 'blocklink';
$moreLinkAttribs['class'] = 'mw-usertoollinks-block';
$blockLink = self::link( $blockPage,
- wfMessage( 'blocklink' )->escaped(),
+ wfMessage( $message )->escaped(),
$moreLinkAttribs );
return $blockLink;
}
--
To view, visit https://gerrit.wikimedia.org/r/344811
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I85f8ad1133ed6085220bc35ba99b73cf8a489fd0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EddieGP <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits