(bug 41793) Make contribs. link on Special:ListUsers red for users with 0 edits
authorMarius Hoch <hoo@online.de>
Tue, 6 Nov 2012 21:49:28 +0000 (22:49 +0100)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Wed, 7 Nov 2012 19:38:32 +0000 (20:38 +0100)
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
includes/User.php
includes/specials/SpecialListusers.php

index ce6966e..4be260e 100644 (file)
@@ -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
index c0d71e4..f02cc29 100644 (file)
@@ -2469,7 +2469,7 @@ class User {
                                        $count = $this->initEditCount();
                                }
                                wfProfileOut( __METHOD__ );
-                               $this->mEditCount = $count;
+                               $this->mEditCount = intval( $count );
                        }
                        return $this->mEditCount;
                } else {
index 8b44828..ea598c3 100644 (file)
@@ -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();