From 56524c050db26544d25d28fa50878dd2d68cbe6c Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Thu, 10 Apr 2014 16:31:55 -0300 Subject: [PATCH] Exclude external RC entries (e.g. Wikidata) from Special:ActiveUsers People usually want to know who the active users are on the local wiki, not who edited something on Wikidata. Note, this changes the query to no longer use a covering index when joining against the recentchanges table when displaying the page. Bug: 63769 Change-Id: I919123f396d0901822108a4675593a2ff5b7307f --- includes/specials/SpecialActiveusers.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index dd6bec2e6e..f739d3bec3 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -97,7 +97,8 @@ class ActiveUsersPager extends UsersPager { 'qcc_type' => 'activeusers', 'qcc_namespace' => NS_USER, 'user_name = qcc_title', - 'rc_user_text = qcc_title' + 'rc_user_text = qcc_title', + 'rc_type != ' . $dbr->addQuotes( RC_EXTERNAL ) // Don't count wikidata. ); if ( $this->requestedUser != '' ) { $conds[] = 'qcc_title >= ' . $dbr->addQuotes( $this->requestedUser ); @@ -340,6 +341,7 @@ class SpecialActiveUsers extends SpecialPage { array( 'rc_user_text', 'lastedittime' => 'MAX(rc_timestamp)' ), array( 'rc_user > 0', // actual accounts + 'rc_type != ' . $dbw->addQuotes( RC_EXTERNAL ), // no wikidata 'rc_log_type IS NULL OR rc_log_type != ' . $dbw->addQuotes( 'newusers' ), 'rc_timestamp >= ' . $dbw->addQuotes( $dbw->timestamp( $sTimestamp ) ), 'rc_timestamp <= ' . $dbw->addQuotes( $dbw->timestamp( $eTimestamp ) ) -- 2.20.1