53 $this->RCMaxAge = $this->
getConfig()->get(
'ActiveUserDays' );
54 $this->requestedUser =
'';
58 $username = Title::makeTitleSafe( NS_USER, $un );
60 $this->requestedUser =
$username->getText();
68 $this->excludegroups[] =
'bot';
71 $this->excludegroups[] =
'sysop';
82 $rcQuery = ActorMigration::newMigration()->getJoin(
'rc_user' );
84 $activeUserSeconds = $this->
getConfig()->get(
'ActiveUserDays' ) * 86400;
85 $timestamp =
$dbr->timestamp(
wfTimestamp( TS_UNIX ) - $activeUserSeconds );
86 $tables = [
'querycachetwo',
'user',
'rc' => [
'recentchanges' ] + $rcQuery[
'tables'] ];
88 'user' => [
'JOIN',
'user_name = qcc_title' ],
89 'rc' => [
'JOIN', $rcQuery[
'fields'][
'rc_user_text'] .
' = qcc_title' ],
90 ] + $rcQuery[
'joins'];
92 'qcc_type' =>
'activeusers',
96 'rc_log_type IS NULL OR rc_log_type != ' .
$dbr->addQuotes(
'newusers' ),
97 'rc_timestamp >= ' .
$dbr->addQuotes( $timestamp ),
99 if ( $this->requestedUser !=
'' ) {
100 $conds[] =
'qcc_title >= ' .
$dbr->addQuotes( $this->requestedUser );
102 if ( $this->
groups !== [] ) {
104 $jconds[
'user_groups'] = [
'JOIN', [
'ug_user = user_id' ] ];
106 $conds[] =
'ug_expiry IS NULL OR ug_expiry >= ' .
$dbr->addQuotes(
$dbr->timestamp() );
108 if ( $this->excludegroups !== [] ) {
109 foreach ( $this->excludegroups as $group ) {
110 $conds[] =
'NOT EXISTS (' .
$dbr->selectSQLText(
111 'user_groups',
'1', [
113 'ug_group' => $group,
114 'ug_expiry IS NULL OR ug_expiry >= ' .
$dbr->addQuotes(
$dbr->timestamp() )
119 if ( !$this->
getUser()->isAllowed(
'hideuser' ) ) {
120 $conds[] =
'NOT EXISTS (' .
$dbr->selectSQLText(
121 'ipblocks',
'1', [
'ipb_user=user_id',
'ipb_deleted' => 1 ]
129 'user_name' =>
'qcc_title',
130 'user_id' =>
'MAX(user_id)',
131 'recentedits' =>
'COUNT(*)'
133 'options' => [
'GROUP BY' => [
'qcc_title' ] ],
135 'join_conds' => $jconds,
140 parent::doBatchLookups();
143 foreach ( $this->mResult as $row ) {
144 $uids[] = $row->user_id;
152 [
'ipb_user',
'MAX(ipb_deleted) AS block_status' ],
153 [
'ipb_user' => $uids ],
155 [
'GROUP BY' => [
'ipb_user' ] ]
157 $this->blockStatusByUid = [];
158 foreach (
$res as $row ) {
159 $this->blockStatusByUid[$row->ipb_user] = $row->block_status;
161 $this->mResult->seek( 0 );
165 $userName = $row->user_name;
176 foreach ( $ugms as $ugm ) {
184 $isBlocked = isset( $this->blockStatusByUid[$row->user_id] );
185 if ( $isBlocked && $this->blockStatusByUid[$row->user_id] == 1 ) {
186 $item =
"<span class=\"deleted\">$item</span>";
188 $count = $this->
msg(
'activeusers-count' )->numParams( $row->recentedits )
189 ->params( $userName )->numParams( $this->RCMaxAge )->escaped();
190 $blocked = $isBlocked ?
' ' . $this->
msg(
'listusers-blocked', $userName )->escaped() :
'';
192 return Html::rawElement(
'li', [],
"{$item} [{$count}]{$blocked}" );
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
msg( $key)
Get a Message object with context set Parameters are the same as wfMessage()
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
static userToolLinks( $userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
Generate standard user tool links (talk, contributions, block link, etc.)
static newFromId( $id)
Static factory method for creation from a given user ID.
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist & $tables
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist and Watchlist you will want to construct new ChangesListBooleanFilter or ChangesListStringOptionsFilter objects When constructing you specify which group they belong to You can reuse existing groups(accessed through $special->getFilterGroup)
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
this hook is for auditing only or null if authentication failed before getting that far $username
Interface for objects which can provide a MediaWiki context on request.
if(!isset( $args[0])) $lang