From: Brian Wolff Date: Thu, 10 Apr 2014 19:31:55 +0000 (-0300) Subject: Exclude external RC entries (e.g. Wikidata) from Special:ActiveUsers X-Git-Tag: 1.31.0-rc.0~16270 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/supprimer.php?a=commitdiff_plain;h=56524c050db26544d25d28fa50878dd2d68cbe6c;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) )