r41350 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41349‎ | r41350 | r41351 >
Date:15:52, 28 September 2008
Author:aaron
Status:old (Comments)
Tags:
Comment:
Make listusers show users' edit counts (bug 15503)
Modified paths:
  • /trunk/phase3/includes/specials/SpecialListusers.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1317,6 +1317,7 @@
13181318 'listusers',
13191319 'listusers-summary',
13201320 'listusers-editsonly',
 1321+ 'usereditcount',
13211322 'newpages',
13221323 'newpages-summary',
13231324 'newpages-username',
Index: trunk/phase3/includes/specials/SpecialListusers.php
@@ -94,6 +94,7 @@
9595 LEFT JOIN $ipblocks ON user_id=ipb_user AND ipb_auto=0 ",
9696 'fields' => array('user_name',
9797 'MAX(user_id) AS user_id',
 98+ 'MAX(user_editcount) AS edits',
9899 'COUNT(ug_group) AS numgroups',
99100 'MAX(ug_group) AS singlegroup'),
100101 'options' => array('GROUP BY' => 'user_name'),
@@ -120,8 +121,9 @@
121122 }
122123
123124 $item = wfSpecialList( $name, $groups );
 125+ $edits = wfMsgExt('usereditcount',array('parsemag'),$row->edits);
124126 wfRunHooks( 'SpecialListusersFormatRow', array( &$item, $row ) );
125 - return "<li>{$item}</li>";
 127+ return "<li>{$item} [$edits]</li>";
126128 }
127129
128130 function getBody() {
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2044,6 +2044,7 @@
20452045 'listusers' => 'User list',
20462046 'listusers-summary' => '', # do not translate or duplicate this message to other languages
20472047 'listusers-editsonly' => 'Show users with edits only',
 2048+'usereditcount' => '$1 {{PLURAL:$1|edit|edits}}',
20482049 'newpages' => 'New pages',
20492050 'newpages-summary' => '', # do not translate or duplicate this message to other languages
20502051 'newpages-username' => 'Username:',

Follow-up revisions

RevisionCommit summaryAuthorDate
r41921Fix stomach-churning case of edititis in r41350: made optional.tstarling01:54, 10 October 2008
r45039Minor fix to GlobalUserrights: fixed bug where global rights wouldn't show up...pinky19:44, 25 December 2008

Comments

#Comment by Tim Starling (talk | contribs)   01:54, 10 October 2008

see r41921.

Status & tagging log