* (bug 3717) Update user count for AuthPlugin account autocreation
* (bug 8719) Firefox release notes lie! Fix tooltips for Firefox 2 on x11;
accesskeys default settings appear to be same as Windows.
+* Added an option to make Linker::userToolLinks() show the contribs link
+ red when the user has no edits. Linker::userToolLinksRedContribs() is an
+ alias to that which should be used to make it more self documentating.
== Languages updated ==
/**
* @param $userId Integer: user id in database.
* @param $userText String: user name in database.
+ * @param $redContribsWhenNoEdits Bool: return a red contribs link when the user had no edits and this is true.
* @return string HTML fragment with talk and/or block links
- * @private
*/
- function userToolLinks( $userId, $userText ) {
+ public function userToolLinks( $userId, $userText, $redContribsWhenNoEdits = false ) {
global $wgUser, $wgDisableAnonTalk, $wgSysopUserBans;
$talkable = !( $wgDisableAnonTalk && 0 == $userId );
$blockable = ( $wgSysopUserBans || 0 == $userId );
$items[] = $this->userTalkLink( $userId, $userText );
}
if( $userId ) {
+ // check if the user has an edit
+ if( $redContribsWhenNoEdits && User::edits( $userId ) == 0 ) {
+ $style = "class='new'";
+ } else {
+ $style = '';
+ }
$contribsPage = SpecialPage::getTitleFor( 'Contributions', $userText );
- $items[] = $this->makeKnownLinkObj( $contribsPage ,
- wfMsgHtml( 'contribslink' ) );
+
+ $items[] = $this->makeKnownLinkObj( $contribsPage, wfMsgHtml( 'contribslink' ), '', '', '', '', $style );
}
if( $blockable && $wgUser->isAllowed( 'block' ) ) {
$items[] = $this->blockLink( $userId, $userText );
}
}
+ /**
+ * Alias for userToolLinks( $userId, $userText, true );
+ */
+ public function userToolLinksRedContribs( $userId, $userText ) {
+ return $this->userToolLinks( $userId, $userText, true );
+ }
+
+
/**
* @param $userId Integer: user id in database.
* @param $userText String: user name in database.
$linkCache->addBadLinkObj( $title );
}
- $userLink = $this->skin->userLink( $s->log_user, $s->user_name ) . $this->skin->userToolLinks( $s->log_user, $s->user_name );
+ $userLink = $this->skin->userLink( $s->log_user, $s->user_name ) . $this->skin->userToolLinksRedContribs( $s->log_user, $s->user_name );
$comment = $this->skin->commentBlock( $s->log_comment );
$paramArray = LogPage::extractParams( $s->log_params );
$revert = '';