60 $this->RCMaxAge = $this->
getConfig()->get(
'ActiveUserDays' );
61 $this->requestedUser =
'';
67 $this->requestedUser =
$username->getText();
71 if ( $opts->
getValue(
'hidebots' ) == 1 ) {
72 $this->hideRights[] =
'bot';
74 if ( $opts->
getValue(
'hidesysops' ) == 1 ) {
75 $this->hideGroups[] =
'sysop';
86 $activeUserSeconds = $this->
getConfig()->get(
'ActiveUserDays' ) * 86400;
89 'qcc_type' =>
'activeusers',
91 'user_name = qcc_title',
92 'rc_user_text = qcc_title',
95 'rc_log_type IS NULL OR rc_log_type != ' .
$dbr->addQuotes(
'newusers' ),
98 if ( $this->requestedUser !=
'' ) {
99 $conds[] =
'qcc_title >= ' .
$dbr->addQuotes( $this->requestedUser );
101 if ( !$this->
getUser()->isAllowed(
'hideuser' ) ) {
102 $conds[] =
'NOT EXISTS (' .
$dbr->selectSQLText(
103 'ipblocks',
'1', [
'ipb_user=user_id',
'ipb_deleted' => 1 ]
107 if (
$dbr->implicitGroupby() ) {
108 $options = [
'GROUP BY' => [
'qcc_title' ] ];
110 $options = [
'GROUP BY' => [
'user_name',
'user_id',
'qcc_title' ] ];
114 'tables' => [
'querycachetwo',
'user',
'recentchanges' ],
115 'fields' => [
'user_name',
'user_id',
'recentedits' =>
'COUNT(*)',
'qcc_title' ],
122 parent::doBatchLookups();
125 foreach ( $this->mResult
as $row ) {
126 $uids[] = $row->user_id;
134 [
'ipb_user',
'MAX(ipb_deleted) AS block_status' ],
135 [
'ipb_user' => $uids ],
137 [
'GROUP BY' => [
'ipb_user' ] ]
139 $this->blockStatusByUid = [];
140 foreach (
$res as $row ) {
141 $this->blockStatusByUid[$row->ipb_user] = $row->block_status;
143 $this->mResult->seek( 0 );
147 $userName = $row->user_name;
158 foreach ( $this->hideRights
as $right ) {
163 if ( in_array( $right,
$user->getRights() ) ) {
172 $groups_list = self::getGroups( intval( $row->user_id ), $this->userGroupCache );
173 foreach ( $groups_list
as $group ) {
174 if ( in_array( $group, $this->hideGroups ) ) {
177 $list[] = self::buildGroupLink( $group, $userName );
180 $groups =
$lang->commaList( $list );
182 $item =
$lang->specialList( $ulinks, $groups );
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() :
'';
Interface for objects which can provide a MediaWiki context on request.
getLanguage()
Get the Language object.
static rawElement($element, $attribs=[], $contents= '')
Returns an HTML element in a string.
if(!isset($args[0])) $lang
static newFromId($id)
Static factory method for creation from a given user ID.
const TS_UNIX
Unix time - the number of seconds since 1970-01-01 00:00:00 UTC.
wfTimestamp($outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
msg()
Get a Message object with context set Parameters are the same as wfMessage()
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content as context as context $options
getConfig()
Get the Config object.
static makeTitleSafe($ns, $title, $fragment= '', $interwiki= '')
Create a new Title from a namespace index and a DB key.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account $user
static userLink($userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
this hook is for auditing only or null if authentication failed before getting that far $username
static userToolLinks($userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
Generate standard user tool links (talk, contributions, block link, etc.)
getUser()
Get the User object.