From 59a7b940db58ce90374aada8cd4d481582dbc008 Mon Sep 17 00:00:00 2001 From: Leon Weber Date: Sun, 14 Jan 2007 00:58:17 +0000 Subject: [PATCH] Made Linke::userToolLinks() show the contribs link red when the user has zero edits --- RELEASE-NOTES | 1 + includes/Linker.php | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b743c595c1..4620986982 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -63,6 +63,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN determining whether action=purge can be done via GET. Switching the permission on for anons can be helpful for benchmarking. * Unmaintained Oracle support files have been removed. +* Made Linke::userToolLinks() show the contribs link red when the user has zero edits == Languages updated == diff --git a/includes/Linker.php b/includes/Linker.php index cddd33dbb8..a332b83784 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -769,9 +769,17 @@ class Linker { $items[] = $this->userTalkLink( $userId, $userText ); } if( $userId ) { + // check if the user has an edit + if( $wgUser->edits( $userId ) == 0 ) { + $style = "class='new'"; + } else { + $style = ''; + } $contribsPage = SpecialPage::getTitleFor( 'Contributions', $userText ); $items[] = $this->makeKnownLinkObj( $contribsPage , - wfMsgHtml( 'contribslink' ) ); + wfMsgHtml( 'contribslink' ), + '', '', '', '', $style + ); } if( $blockable && $wgUser->isAllowed( 'block' ) ) { $items[] = $this->blockLink( $userId, $userText ); -- 2.20.1