) . ')';
}
+ if ( $dbr->implicitGroupby() ) {
+ $options = array( 'GROUP BY' => array( 'qcc_title' ) );
+ } else {
+ $options = array( 'GROUP BY' => array( 'user_name', 'user_id', 'qcc_title' ) );
+ }
+
return array(
'tables' => array( 'querycachetwo', 'user', 'recentchanges' ),
'fields' => array( 'user_name', 'user_id', 'recentedits' => 'COUNT(*)', 'qcc_title' ),
- 'options' => array( 'GROUP BY' => array( 'qcc_title' ) ),
+ 'options' => $options,
'conds' => $conds
);
}
function doBatchLookups() {
+ parent::doBatchLookups();
+
$uids = array();
foreach ( $this->mResult as $row ) {
$uids[] = $row->user_id;
// Note: This is a different loop than for user rights,
// because we're reusing it to build the group links
// at the same time
- foreach ( $user->getGroups() as $group ) {
+ $groups_list = self::getGroups( intval( $row->user_id ), $this->userGroupCache );
+ foreach ( $groups_list as $group ) {
if ( in_array( $group, $this->hideGroups ) ) {
return '';
}
// Occasionally merge in new updates
$seconds = min( self::mergeActiveUsers( 300, $days ), $days * 86400 );
- // Mention the level of staleness
- $out->addWikiMsg( 'cachedspecial-viewing-cached-ttl',
- $this->getLanguage()->formatDuration( $seconds ) );
+ if ( $seconds > 0 ) {
+ // Mention the level of staleness
+ $out->addWikiMsg( 'cachedspecial-viewing-cached-ttl',
+ $this->getLanguage()->formatDuration( $seconds ) );
+ }
$up = new ActiveUsersPager( $this->getContext(), null, $par );