) . ')';
}
+ 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
);
}
// 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 );