MediaWiki r41921 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r41920‎ | r41921 (on ViewVC)‎ | 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:

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php	(revision 41920)
+++ trunk/phase3/includes/DefaultSettings.php	(revision 41921)
@@ -3464,8 +3464,13 @@
 $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;
Index: trunk/phase3/includes/specials/SpecialListusers.php
===================================================================
--- trunk/phase3/includes/specials/SpecialListusers.php	(revision 41920)
+++ trunk/phase3/includes/specials/SpecialListusers.php	(revision 41921)
@@ -123,10 +123,16 @@
 		}
 
 		$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 "<li>{$item} [$edits]</li>";
+		return "<li>{$item}{$edits}</li>";
 	}
 
 	function getBody() {
Index: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES	(revision 41920)
+++ trunk/phase3/RELEASE-NOTES	(revision 41921)
@@ -162,6 +162,9 @@
 * (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 ===
 

Status & tagging log

  • 15:32, 12 September 2011 Meno25 (Talk | contribs) changed the status of r41921 [removed: ok added: old]
  • 21:48, 11 June 2011 Krinkle (Talk | contribs) changed the tags for r41921 [removed: edititis]
  • 18:53, 2 April 2011 Happy-melon (Talk | contribs) changed the tags for r41921 [removed: listusers]
Personal tools
Namespaces
Variants
Views
Actions
Site
Support
Download
Development
Communication
Toolbox