From 5394e3018c3ce0601aa634b4cccb17033fade00b Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 10 Oct 2008 01:54:04 +0000 Subject: [PATCH] Fix stomach-churning case of edititis in r41350: made optional. --- RELEASE-NOTES | 3 +++ includes/DefaultSettings.php | 7 ++++++- includes/specials/SpecialListusers.php | 12 +++++++++--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4402fb1700..00256b81bd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -162,6 +162,9 @@ The following extensions are migrated into MediaWiki 1.14: * (bug 44) The {{ns:}} core parser function now also accepts localized namespace names and aliases; also, its output now uses spaces instead of underscores to match the behavior of the {{NAMESPACE}} magic word +* Added the ability to display user edit counts in Special:ListUsers. Off by + default, enabled with $wgEdititis = true (named after the medical condition + marked by unhealthy obsession with edit counts). === Bug fixes in 1.14 === diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 912fb8109e..a31329c072 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3463,9 +3463,14 @@ $wgPasswordAttemptThrottle = array( 'count' => 5, 'seconds' => 300 ); */ $wgMajorSiteNoticeID = 1; +/** + * Display user edit counts in various prominent places. + */ +$wgEdititis = false; + /** * Enable the UniversalEditButton for browsers that support it * (currently only Firefox with an extension) * See http://universaleditbutton.org for more background information */ -$wgUniversalEditButton = true; \ No newline at end of file +$wgUniversalEditButton = true; diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index 5d8222b215..77c9ca1706 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -123,10 +123,16 @@ class UsersPager extends AlphabeticPager { } $item = wfSpecialList( $name, $groups ); - $editCount = $wgLang->formatNum( $row->edits ); - $edits = wfMsgExt( 'usereditcount', 'parsemag', $editCount ); + + global $wgEdititis; + if ( $wgEdititis ) { + $editCount = $wgLang->formatNum( $row->edits ); + $edits = ' [' . wfMsgExt( 'usereditcount', 'parsemag', $editCount ) . ']'; + } else { + $edits = ''; + } wfRunHooks( 'SpecialListusersFormatRow', array( &$item, $row ) ); - return "
  • {$item} [$edits]
  • "; + return "
  • {$item}{$edits}
  • "; } function getBody() { -- 2.20.1