X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2Fpagers%2FActiveUsersPager.php;h=26ed4997ee4f53ff5b408b1015ac1006d7b6926e;hp=64af71a16ae26a8aee2f63344002bc2d0390ac2d;hb=27c61fb1e94da9114314468fd00bcf129ec064b6;hpb=0c712ce564e0bd53e28f2581a714ee8cd04b614c diff --git a/includes/specials/pagers/ActiveUsersPager.php b/includes/specials/pagers/ActiveUsersPager.php index 64af71a16a..26ed4997ee 100644 --- a/includes/specials/pagers/ActiveUsersPager.php +++ b/includes/specials/pagers/ActiveUsersPager.php @@ -79,14 +79,17 @@ class ActiveUsersPager extends UsersPager { function getQueryInfo() { $dbr = $this->getDatabase(); + $rcQuery = ActorMigration::newMigration()->getJoin( 'rc_user' ); + $activeUserSeconds = $this->getConfig()->get( 'ActiveUserDays' ) * 86400; $timestamp = $dbr->timestamp( wfTimestamp( TS_UNIX ) - $activeUserSeconds ); - $tables = [ 'querycachetwo', 'user', 'recentchanges' ]; + $tables = [ 'querycachetwo', 'user', 'recentchanges' ] + $rcQuery['tables']; + $jconds = $rcQuery['joins']; $conds = [ 'qcc_type' => 'activeusers', 'qcc_namespace' => NS_USER, 'user_name = qcc_title', - 'rc_user_text = qcc_title', + $rcQuery['fields']['rc_user_text'] . ' = qcc_title', 'rc_type != ' . $dbr->addQuotes( RC_EXTERNAL ), // Don't count wikidata. 'rc_type != ' . $dbr->addQuotes( RC_CATEGORIZE ), // Don't count categorization changes. 'rc_log_type IS NULL OR rc_log_type != ' . $dbr->addQuotes( 'newusers' ), @@ -127,7 +130,8 @@ class ActiveUsersPager extends UsersPager { 'recentedits' => 'COUNT(*)' ], 'options' => [ 'GROUP BY' => [ 'qcc_title' ] ], - 'conds' => $conds + 'conds' => $conds, + 'join_conds' => $jconds, ]; }