From: Brad Jorsch Date: Tue, 1 Jul 2014 19:53:59 +0000 (-0400) Subject: Properly count actions in Special:ActiveUsers X-Git-Tag: 1.31.0-rc.0~15135 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=bb3e01947f570445cd2a9c5d6dff929233639ef3;p=lhc%2Fweb%2Fwiklou.git Properly count actions in Special:ActiveUsers The cache of active users maintained by Special:ActiveUsers filters out certain actions, but the displayed action count does not. Fix this. Change-Id: Ifb9035a08328587c43c46520c5062602b9b9c6f5 --- diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index c42c089c80..8dc4b3c7a0 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -92,12 +92,16 @@ class ActiveUsersPager extends UsersPager { function getQueryInfo() { $dbr = $this->getDatabase(); + $activeUserSeconds = $this->getConfig()->get( 'ActiveUserDays' ) * 86400; + $timestamp = $dbr->timestamp( wfTimestamp( TS_UNIX ) - $activeUserSeconds ); $conds = array( 'qcc_type' => 'activeusers', 'qcc_namespace' => NS_USER, 'user_name = qcc_title', 'rc_user_text = qcc_title', - 'rc_type != ' . $dbr->addQuotes( RC_EXTERNAL ) // Don't count wikidata. + 'rc_type != ' . $dbr->addQuotes( RC_EXTERNAL ), // Don't count wikidata. + 'rc_log_type IS NULL OR rc_log_type != ' . $dbr->addQuotes( 'newusers' ), + 'rc_timestamp >= ' . $dbr->addQuotes( $timestamp ), ); if ( $this->requestedUser != '' ) { $conds[] = 'qcc_title >= ' . $dbr->addQuotes( $this->requestedUser );