getConfig()->get( 'ActiveUserDays' ); $this->setHeaders(); $this->outputHeader(); $out = $this->getOutput(); $out->wrapWikiMsg( "
\n$1\n
", [ 'activeusers-intro', $this->getLanguage()->formatNum( $days ) ] ); // Mention the level of cache staleness... $dbr = wfGetDB( DB_SLAVE, 'recentchanges' ); $rcMax = $dbr->selectField( 'recentchanges', 'MAX(rc_timestamp)', '', __METHOD__ ); if ( $rcMax ) { $cTime = $dbr->selectField( 'querycache_info', 'qci_timestamp', [ 'qci_type' => 'activeusers' ], __METHOD__ ); if ( $cTime ) { $secondsOld = wfTimestamp( TS_UNIX, $rcMax ) - wfTimestamp( TS_UNIX, $cTime ); } else { $rcMin = $dbr->selectField( 'recentchanges', 'MIN(rc_timestamp)' ); $secondsOld = time() - wfTimestamp( TS_UNIX, $rcMin ); } if ( $secondsOld > 0 ) { $out->addWikiMsg( 'cachedspecial-viewing-cached-ttl', $this->getLanguage()->formatDuration( $secondsOld ) ); } } $up = new ActiveUsersPager( $this->getContext(), null, $par ); # getBody() first to check, if empty $usersbody = $up->getBody(); $out->addHTML( $up->getPageHeader() ); if ( $usersbody ) { $out->addHTML( $up->getNavigationBar() . Html::rawElement( 'ul', [], $usersbody ) . $up->getNavigationBar() ); } else { $out->addWikiMsg( 'activeusers-noresult' ); } } protected function getGroupName() { return 'users'; } }