Made Linke::userToolLinks() show the contribs link red when the user has zero edits
authorLeon Weber <leon@users.mediawiki.org>
Sun, 14 Jan 2007 00:58:17 +0000 (00:58 +0000)
committerLeon Weber <leon@users.mediawiki.org>
Sun, 14 Jan 2007 00:58:17 +0000 (00:58 +0000)
RELEASE-NOTES
includes/Linker.php

index b743c59..4620986 100644 (file)
@@ -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 ==
index cddd33d..a332b83 100644 (file)
@@ -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 );