From 070d5ca071f46d5ea1a0ab21ed09128b2cb8ca08 Mon Sep 17 00:00:00 2001 From: Marius Hoch Date: Tue, 6 Nov 2012 22:49:28 +0100 Subject: [PATCH] (bug 41793) Make contribs. link on Special:ListUsers red for users with 0 edits The link to the user contributions on Special:ListUsers weren't red as the needed parameter for this wasn't set in the call to Linker::userToolLinks and User::getEditCount returned strings while it was supposed to return integers. Change-Id: I8d5faaedefec02d309e3e9c2da80f135b44fa5f1 --- RELEASE-NOTES-1.21 | 2 ++ includes/User.php | 2 +- includes/specials/SpecialListusers.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index ce6966eda2..4be260e97b 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -58,6 +58,8 @@ production. caught during API execution. * (bug 37963) Fixed loading process for user options * (bug 26995) Update filename field on Upload page after having sanitized it. +* (bug 41793) Contribution links to users with 0 edits on Special:ListUsers didn't + show up red. === API changes in 1.21 === * prop=revisions can now report the contentmodel and contentformat, see docs/contenthandler.txt diff --git a/includes/User.php b/includes/User.php index c0d71e4da7..f02cc29812 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2469,7 +2469,7 @@ class User { $count = $this->initEditCount(); } wfProfileOut( __METHOD__ ); - $this->mEditCount = $count; + $this->mEditCount = intval( $count ); } return $this->mEditCount; } else { diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index 8b448281c5..ea598c3687 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -153,7 +153,7 @@ class UsersPager extends AlphabeticPager { $userName = $row->user_name; $ulinks = Linker::userLink( $row->user_id, $userName ); - $ulinks .= Linker::userToolLinks( $row->user_id, $userName ); + $ulinks .= Linker::userToolLinksRedContribs( $row->user_id, $userName, intval( $row->edits ) ); $lang = $this->getLanguage(); -- 2.20.1