r41921 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41920‎ | r41921 | r41922 >
Date:01:54, 10 October 2008
Author:tstarling
Status:old
Tags:edit count 
Comment:
Fix stomach-churning case of edititis in r41350: made optional.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialListusers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -3464,8 +3464,13 @@
34653465 $wgMajorSiteNoticeID = 1;
34663466
34673467 /**
 3468+ * Display user edit counts in various prominent places.
 3469+ */
 3470+$wgEdititis = false;
 3471+
 3472+/**
34683473 * Enable the UniversalEditButton for browsers that support it
34693474 * (currently only Firefox with an extension)
34703475 * See http://universaleditbutton.org for more background information
34713476 */
3472 -$wgUniversalEditButton = true;
\ No newline at end of file
 3477+$wgUniversalEditButton = true;
Index: trunk/phase3/includes/specials/SpecialListusers.php
@@ -123,10 +123,16 @@
124124 }
125125
126126 $item = wfSpecialList( $name, $groups );
127 - $editCount = $wgLang->formatNum( $row->edits );
128 - $edits = wfMsgExt( 'usereditcount', 'parsemag', $editCount );
 127+
 128+ global $wgEdititis;
 129+ if ( $wgEdititis ) {
 130+ $editCount = $wgLang->formatNum( $row->edits );
 131+ $edits = ' [' . wfMsgExt( 'usereditcount', 'parsemag', $editCount ) . ']';
 132+ } else {
 133+ $edits = '';
 134+ }
129135 wfRunHooks( 'SpecialListusersFormatRow', array( &$item, $row ) );
130 - return "<li>{$item} [$edits]</li>";
 136+ return "<li>{$item}{$edits}</li>";
131137 }
132138
133139 function getBody() {
Index: trunk/phase3/RELEASE-NOTES
@@ -162,6 +162,9 @@
163163 * (bug 44) The {{ns:}} core parser function now also accepts localized namespace
164164 names and aliases; also, its output now uses spaces instead of underscores to
165165 match the behavior of the {{NAMESPACE}} magic word
 166+* Added the ability to display user edit counts in Special:ListUsers. Off by
 167+ default, enabled with $wgEdititis = true (named after the medical condition
 168+ marked by unhealthy obsession with edit counts).
166169
167170 === Bug fixes in 1.14 ===
168171

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r41350Make listusers show users' edit counts (bug 15503)aaron15:52, 28 September 2008

Status & tagging log