r50070 - Code Review

From MediaWiki.org

Jump to: navigation, search
Repository:MediaWiki
Revision:r50069 | r50070 (on ViewVC) | r50071 >
Date:07:19, 30 April 2009
Author:aaron
Status:ok
Tags:1.15 
Comment:Tweaked account hiding & renaming limits
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialBlockip.php
===================================================================
--- trunk/phase3/includes/specials/SpecialBlockip.php	(revision 50069)
+++ trunk/phase3/includes/specials/SpecialBlockip.php	(revision 50070)
@@ -42,6 +42,8 @@
  */
 class IPBlockForm {
 	var $BlockAddress, $BlockExpiry, $BlockReason;
+	// The maximum number of edits a user can have and still be hidden
+	const HIDEUSER_CONTRIBLIMIT = 1000;
 
 	public function __construct( $par ) {
 		global $wgRequest, $wgUser, $wgBlockAllowsUTEdit;
@@ -397,7 +399,7 @@
 			} else if( $expiry !== 'infinity' ) {
 				// Bad expiry.
 				return array('ipb_expiry_temp');
-			} else if( User::edits($userId) > 3000 ) {
+			} else if( User::edits($userId) > self::HIDEUSER_CONTRIBLIMIT ) {
 				// Typically, the user should have a handful of edits.
 				// Disallow hiding users with many edits for performance.
 				return array('ipb_hide_invalid');
Index: trunk/extensions/Renameuser/SpecialRenameuser.php
===================================================================
--- trunk/extensions/Renameuser/SpecialRenameuser.php	(revision 50069)
+++ trunk/extensions/Renameuser/SpecialRenameuser.php	(revision 50070)
@@ -32,8 +32,8 @@
  * The maximum number of edits a user can have and still be allowed renaming,
  * set it to 0 to disable the limit.
  */
-define( 'RENAMEUSER_CONTRIBLIMIT', 2000000 );
-define( 'RENAMEUSER_CONTRIBJOB', 10000 );
+define( 'RENAMEUSER_CONTRIBLIMIT', 1000000 );
+define( 'RENAMEUSER_CONTRIBJOB', 5000 );
 
 # Add a new log type
 global $wgLogTypes, $wgLogNames, $wgLogHeaders, $wgLogActions;

Follow-up revisions

RevisionCommit summaryAuthorDate
r50162Backports for the hide user feature:tstarling07:58, 4 May 2009

Status & tagging log

Views
Toolbox