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';
86 $activeUserSeconds = $this->
getConfig()->get(
'ActiveUserDays' ) * 86400;
87 $timestamp =
$dbr->timestamp(
wfTimestamp( TS_UNIX ) - $activeUserSeconds );
91 $tables = [
'querycachetwo',
'user' ];
92 $fields = [
'qcc_title',
'user_id' ];
94 'user' => [
'JOIN',
'user_name = qcc_title' ],
97 'qcc_type' =>
'activeusers',
101 if (
$data !==
null ) {
106 if ( $this->requestedUser !=
'' ) {
107 $conds[] =
'qcc_title >= ' .
$dbr->addQuotes( $this->requestedUser );
109 if ( $this->
groups !== [] ) {
110 $tables[
'ug1'] =
'user_groups';
111 $jconds[
'ug1'] = [
'JOIN',
'ug1.ug_user = user_id' ];
113 $conds[] =
'ug1.ug_expiry IS NULL OR ug1.ug_expiry >= ' .
$dbr->addQuotes(
$dbr->timestamp() );
115 if ( $this->excludegroups !== [] ) {
116 $tables[
'ug2'] =
'user_groups';
117 $jconds[
'ug2'] = [
'LEFT JOIN', [
118 'ug2.ug_user = user_id',
120 'ug2.ug_expiry IS NULL OR ug2.ug_expiry >= ' .
$dbr->addQuotes(
$dbr->timestamp() ),
122 $conds[
'ug2.ug_user'] =
null;
124 if ( !$this->
getUser()->isAllowed(
'hideuser' ) ) {
125 $conds[] =
'NOT EXISTS (' .
$dbr->selectSQLText(
126 'ipblocks',
'1', [
'ipb_user=user_id',
'ipb_deleted' => 1 ]
133 'actor_user = user_id',
135 $fields[] =
'actor_id';
141 $jconds = [
'recentchanges' => [
'LEFT JOIN', [
142 $useActor ?
'rc_actor = actor_id' :
'rc_user_text = qcc_title',
145 'rc_log_type IS NULL OR rc_log_type != ' .
$dbr->addQuotes(
'newusers' ),
146 'rc_timestamp >= ' .
$dbr->addQuotes( $timestamp ),
154 'user_name' =>
'qcc_title',
155 'user_id' =>
'user_id',
156 'recentedits' =>
'COUNT(rc_id)'
158 'options' => [
'GROUP BY' => [
'qcc_title',
'user_id' ] ],
167 $sortColumns =
array_merge( [ $this->mIndexField ], $this->mExtraSortFields );
168 if ( $order === self::QUERY_ASCENDING ) {
171 $operator = $this->mIncludeOffset ?
'>=' :
'>';
175 foreach ( $sortColumns as $col ) {
176 $orderBy[] = $col .
' DESC';
178 $operator = $this->mIncludeOffset ?
'<=' :
'<';
181 'limit' =>
intval( $limit ),
184 $offset !=
'' ? [ $this->mIndexField . $operator . $this->mDb->addQuotes( $offset ) ] : [],
188 $fields = $info[
'fields'];
189 $conds = $info[
'conds'];
191 $join_conds = $info[
'join_conds'];
197 parent::doBatchLookups();
200 foreach ( $this->mResult as $row ) {
201 $uids[] = $row->user_id;
209 [
'ipb_user',
'MAX(ipb_deleted) AS deleted, MAX(ipb_sitewide) AS sitewide' ],
210 [
'ipb_user' => $uids ],
212 [
'GROUP BY' => [
'ipb_user' ] ]
214 $this->blockStatusByUid = [];
215 foreach (
$res as $row ) {
216 $this->blockStatusByUid[$row->ipb_user] = [
217 'deleted' => $row->deleted,
218 'sitewide' => $row->sitewide,
221 $this->mResult->seek( 0 );
225 $userName = $row->user_name;
235 foreach ( $ugms as $ugm ) {
246 $isBlocked =
isset( $this->blockStatusByUid[$row->user_id] );
248 if ( $this->blockStatusByUid[$row->user_id][
'deleted'] == 1 ) {
249 $item =
"<span class=\"deleted\">$item</span>";
251 if ( $this->blockStatusByUid[$row->user_id][
'sitewide'] == 1 ) {
252 $blocked =
' ' . $this->
msg(
'listusers-blocked', $userName )->escaped();
255 $count = $this->
msg(
'activeusers-count' )->numParams( $row->recentedits )
256 ->params( $userName )->numParams( $this->RCMaxAge )->escaped();
258 return Html::rawElement(
'li', [],
"{$item} [{$count}]{$blocked}" );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
if(defined( 'MW_SETUP_CALLBACK')) $fname
Customization point after all loading (constants, functions, classes, DefaultSettings,...
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, $useParentheses=true)
Generate standard user tool links (talk, contributions, block link, etc.)
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
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 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 or null if authentication failed before getting that far $username
this hook is for auditing only 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)
$data
Utility to generate mapping file used in mw.Title (phpCharToUpper.json)
const SCHEMA_COMPAT_READ_NEW
Interface for objects which can provide a MediaWiki context on request.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
if(!isset( $args[0])) $lang