Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/207820
Change subject: Remove global 'RENAMEUSER_CONTRIBJOB' constant
......................................................................
Remove global 'RENAMEUSER_CONTRIBJOB' constant
Moved to RenameuserSQL::CONTRIB_JOB
Change-Id: I2c9c2b85d6899af578fb2161e8a521a20eab6a93
---
M Renameuser.php
M RenameuserSQL.php
2 files changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Renameuser
refs/changes/20/207820/1
diff --git a/Renameuser.php b/Renameuser.php
index 363a461..b59810b 100755
--- a/Renameuser.php
+++ b/Renameuser.php
@@ -28,12 +28,6 @@
$wgExtensionMessagesFiles['Renameuser'] = __DIR__ . '/Renameuser.i18n.php';
$wgExtensionMessagesFiles['RenameuserAliases'] = __DIR__ .
'/Renameuser.alias.php';
-/**
- * Users with more than this number of edits will have their rename operation
- * deferred via the job queue.
- */
-define( 'RENAMEUSER_CONTRIBJOB', 500 );
-
# Add a new log type
$wgLogTypes[] = 'renameuser';
$wgLogActionsHandlers['renameuser/renameuser'] = 'RenameuserLogFormatter';
diff --git a/RenameuserSQL.php b/RenameuserSQL.php
index 76fede4..dfdb403 100644
--- a/RenameuserSQL.php
+++ b/RenameuserSQL.php
@@ -67,6 +67,12 @@
private $debugPrefix = '';
/**
+ * Users with more than this number of edits will have their rename
operation
+ * deferred via the job queue.
+ */
+ const CONTRIB_JOB = 500;
+
+ /**
* Constructor
*
* @param $old string The old username
@@ -101,7 +107,7 @@
$this->tables['filearchive'] = array('fa_user_text','fa_user');
$this->tablesJob = array(); // Slow updates
// If this user has a large number of edits, use the jobqueue
- if ( User::newFromId( $uid )->getEditCount() >
RENAMEUSER_CONTRIBJOB ) {
+ if ( User::newFromId( $uid )->getEditCount() >
self::CONTRIB_JOB ) {
$this->tablesJob['revision'] = array( 'rev_user_text',
'rev_user', 'rev_timestamp' );
$this->tablesJob['archive'] = array( 'ar_user_text',
'ar_user', 'ar_timestamp' );
$this->tablesJob['logging'] = array( 'log_user_text',
'log_user', 'log_timestamp' );
--
To view, visit https://gerrit.wikimedia.org/r/207820
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c9c2b85d6899af578fb2161e8a521a20eab6a93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Renameuser
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits