MediaWiki  1.29.1
UsersPager.php
Go to the documentation of this file.
1 <?php
33 class UsersPager extends AlphabeticPager {
34 
38  protected $userGroupCache;
39 
46  function __construct( IContextSource $context = null, $par = null, $including = null ) {
47  if ( $context ) {
48  $this->setContext( $context );
49  }
50 
51  $request = $this->getRequest();
52  $par = ( $par !== null ) ? $par : '';
53  $parms = explode( '/', $par );
54  $symsForAll = [ '*', 'user' ];
55 
56  if ( $parms[0] != '' &&
57  ( in_array( $par, User::getAllGroups() ) || in_array( $par, $symsForAll ) )
58  ) {
59  $this->requestedGroup = $par;
60  $un = $request->getText( 'username' );
61  } elseif ( count( $parms ) == 2 ) {
62  $this->requestedGroup = $parms[0];
63  $un = $parms[1];
64  } else {
65  $this->requestedGroup = $request->getVal( 'group' );
66  $un = ( $par != '' ) ? $par : $request->getText( 'username' );
67  }
68 
69  if ( in_array( $this->requestedGroup, $symsForAll ) ) {
70  $this->requestedGroup = '';
71  }
72  $this->editsOnly = $request->getBool( 'editsOnly' );
73  $this->creationSort = $request->getBool( 'creationSort' );
74  $this->including = $including;
75  $this->mDefaultDirection = $request->getBool( 'desc' )
78 
79  $this->requestedUser = '';
80 
81  if ( $un != '' ) {
83 
84  if ( !is_null( $username ) ) {
85  $this->requestedUser = $username->getText();
86  }
87  }
88 
89  parent::__construct();
90  }
91 
95  function getIndexField() {
96  return $this->creationSort ? 'user_id' : 'user_name';
97  }
98 
102  function getQueryInfo() {
103  $dbr = wfGetDB( DB_REPLICA );
104  $conds = [];
105 
106  // Don't show hidden names
107  if ( !$this->getUser()->isAllowed( 'hideuser' ) ) {
108  $conds[] = 'ipb_deleted IS NULL OR ipb_deleted = 0';
109  }
110 
111  $options = [];
112 
113  if ( $this->requestedGroup != '' ) {
114  $conds['ug_group'] = $this->requestedGroup;
115  $conds[] = 'ug_expiry IS NULL OR ug_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() );
116  }
117 
118  if ( $this->requestedUser != '' ) {
119  # Sorted either by account creation or name
120  if ( $this->creationSort ) {
121  $conds[] = 'user_id >= ' . intval( User::idFromName( $this->requestedUser ) );
122  } else {
123  $conds[] = 'user_name >= ' . $dbr->addQuotes( $this->requestedUser );
124  }
125  }
126 
127  if ( $this->editsOnly ) {
128  $conds[] = 'user_editcount > 0';
129  }
130 
131  $options['GROUP BY'] = $this->creationSort ? 'user_id' : 'user_name';
132 
133  $query = [
134  'tables' => [ 'user', 'user_groups', 'ipblocks' ],
135  'fields' => [
136  'user_name' => $this->creationSort ? 'MAX(user_name)' : 'user_name',
137  'user_id' => $this->creationSort ? 'user_id' : 'MAX(user_id)',
138  'edits' => 'MAX(user_editcount)',
139  'creation' => 'MIN(user_registration)',
140  'ipb_deleted' => 'MAX(ipb_deleted)' // block/hide status
141  ],
142  'options' => $options,
143  'join_conds' => [
144  'user_groups' => [ 'LEFT JOIN', 'user_id=ug_user' ],
145  'ipblocks' => [
146  'LEFT JOIN', [
147  'user_id=ipb_user',
148  'ipb_auto' => 0
149  ]
150  ],
151  ],
152  'conds' => $conds
153  ];
154 
155  Hooks::run( 'SpecialListusersQueryInfo', [ $this, &$query ] );
156 
157  return $query;
158  }
159 
164  function formatRow( $row ) {
165  if ( $row->user_id == 0 ) { # T18487
166  return '';
167  }
168 
169  $userName = $row->user_name;
170 
171  $ulinks = Linker::userLink( $row->user_id, $userName );
173  $row->user_id,
174  $userName,
175  (int)$row->edits
176  );
177 
178  $lang = $this->getLanguage();
179 
180  $groups = '';
181  $ugms = self::getGroupMemberships( intval( $row->user_id ), $this->userGroupCache );
182 
183  if ( !$this->including && count( $ugms ) > 0 ) {
184  $list = [];
185  foreach ( $ugms as $ugm ) {
186  $list[] = $this->buildGroupLink( $ugm, $userName );
187  }
188  $groups = $lang->commaList( $list );
189  }
190 
191  $item = $lang->specialList( $ulinks, $groups );
192 
193  if ( $row->ipb_deleted ) {
194  $item = "<span class=\"deleted\">$item</span>";
195  }
196 
197  $edits = '';
198  if ( !$this->including && $this->getConfig()->get( 'Edititis' ) ) {
199  $count = $this->msg( 'usereditcount' )->numParams( $row->edits )->escaped();
200  $edits = $this->msg( 'word-separator' )->escaped() . $this->msg( 'brackets', $count )->escaped();
201  }
202 
203  $created = '';
204  # Some rows may be null
205  if ( !$this->including && $row->creation ) {
206  $user = $this->getUser();
207  $d = $lang->userDate( $row->creation, $user );
208  $t = $lang->userTime( $row->creation, $user );
209  $created = $this->msg( 'usercreated', $d, $t, $row->user_name )->escaped();
210  $created = ' ' . $this->msg( 'parentheses' )->rawParams( $created )->escaped();
211  }
212  $blocked = !is_null( $row->ipb_deleted ) ?
213  ' ' . $this->msg( 'listusers-blocked', $userName )->escaped() :
214  '';
215 
216  Hooks::run( 'SpecialListusersFormatRow', [ &$item, $row ] );
217 
218  return Html::rawElement( 'li', [], "{$item}{$edits}{$created}{$blocked}" );
219  }
220 
221  function doBatchLookups() {
222  $batch = new LinkBatch();
223  $userIds = [];
224  # Give some pointers to make user links
225  foreach ( $this->mResult as $row ) {
226  $batch->add( NS_USER, $row->user_name );
227  $batch->add( NS_USER_TALK, $row->user_name );
228  $userIds[] = $row->user_id;
229  }
230 
231  // Lookup groups for all the users
232  $dbr = wfGetDB( DB_REPLICA );
233  $groupRes = $dbr->select(
234  'user_groups',
236  [ 'ug_user' => $userIds ],
237  __METHOD__
238  );
239  $cache = [];
240  $groups = [];
241  foreach ( $groupRes as $row ) {
242  $ugm = UserGroupMembership::newFromRow( $row );
243  if ( !$ugm->isExpired() ) {
244  $cache[$row->ug_user][$row->ug_group] = $ugm;
245  $groups[$row->ug_group] = true;
246  }
247  }
248 
249  // Give extensions a chance to add things like global user group data
250  // into the cache array to ensure proper output later on
251  Hooks::run( 'UsersPagerDoBatchLookups', [ $dbr, $userIds, &$cache, &$groups ] );
252 
253  $this->userGroupCache = $cache;
254 
255  // Add page of groups to link batch
256  foreach ( $groups as $group => $unused ) {
257  $groupPage = UserGroupMembership::getGroupPage( $group );
258  if ( $groupPage ) {
259  $batch->addObj( $groupPage );
260  }
261  }
262 
263  $batch->execute();
264  $this->mResult->rewind();
265  }
266 
270  function getPageHeader() {
271  list( $self ) = explode( '/', $this->getTitle()->getPrefixedDBkey() );
272 
273  $this->getOutput()->addModules( 'mediawiki.userSuggest' );
274 
275  # Form tag
277  'form',
278  [ 'method' => 'get', 'action' => wfScript(), 'id' => 'mw-listusers-form' ]
279  ) .
280  Xml::fieldset( $this->msg( 'listusers' )->text() ) .
281  Html::hidden( 'title', $self );
282 
283  # Username field (with autocompletion support)
284  $out .= Xml::label( $this->msg( 'listusersfrom' )->text(), 'offset' ) . ' ' .
285  Html::input(
286  'username',
287  $this->requestedUser,
288  'text',
289  [
290  'class' => 'mw-autocomplete-user',
291  'id' => 'offset',
292  'size' => 20,
293  'autofocus' => $this->requestedUser === ''
294  ]
295  ) . ' ';
296 
297  # Group drop-down list
298  $sel = new XmlSelect( 'group', 'group', $this->requestedGroup );
299  $sel->addOption( $this->msg( 'group-all' )->text(), '' );
300  foreach ( $this->getAllGroups() as $group => $groupText ) {
301  $sel->addOption( $groupText, $group );
302  }
303 
304  $out .= Xml::label( $this->msg( 'group' )->text(), 'group' ) . ' ';
305  $out .= $sel->getHTML() . '<br />';
307  $this->msg( 'listusers-editsonly' )->text(),
308  'editsOnly',
309  'editsOnly',
310  $this->editsOnly
311  );
312  $out .= '&#160;';
314  $this->msg( 'listusers-creationsort' )->text(),
315  'creationSort',
316  'creationSort',
317  $this->creationSort
318  );
319  $out .= '&#160;';
321  $this->msg( 'listusers-desc' )->text(),
322  'desc',
323  'desc',
324  $this->mDefaultDirection
325  );
326  $out .= '<br />';
327 
328  Hooks::run( 'SpecialListusersHeaderForm', [ $this, &$out ] );
329 
330  # Submit button and form bottom
331  $out .= Html::hidden( 'limit', $this->mLimit );
332  $out .= Xml::submitButton( $this->msg( 'listusers-submit' )->text() );
333  Hooks::run( 'SpecialListusersHeader', [ $this, &$out ] );
334  $out .= Xml::closeElement( 'fieldset' ) .
335  Xml::closeElement( 'form' );
336 
337  return $out;
338  }
339 
344  function getAllGroups() {
345  $result = [];
346  foreach ( User::getAllGroups() as $group ) {
347  $result[$group] = UserGroupMembership::getGroupName( $group );
348  }
349  asort( $result );
350 
351  return $result;
352  }
353 
358  function getDefaultQuery() {
359  $query = parent::getDefaultQuery();
360  if ( $this->requestedGroup != '' ) {
361  $query['group'] = $this->requestedGroup;
362  }
363  if ( $this->requestedUser != '' ) {
364  $query['username'] = $this->requestedUser;
365  }
366  Hooks::run( 'SpecialListusersDefaultQuery', [ $this, &$query ] );
367 
368  return $query;
369  }
370 
379  protected static function getGroupMemberships( $uid, $cache = null ) {
380  if ( $cache === null ) {
381  $user = User::newFromId( $uid );
382  return $user->getGroupMemberships();
383  } else {
384  return isset( $cache[$uid] ) ? $cache[$uid] : [];
385  }
386  }
387 
395  protected function buildGroupLink( $group, $username ) {
396  return UserGroupMembership::getLink( $group, $this->getContext(), 'html', $username );
397  }
398 }
ContextSource\$context
IContextSource $context
Definition: ContextSource.php:34
ContextSource\getConfig
getConfig()
Get the Config object.
Definition: ContextSource.php:68
User\newFromId
static newFromId( $id)
Static factory method for creation from a given user ID.
Definition: User.php:579
ContextSource\getContext
getContext()
Get the base IContextSource object.
Definition: ContextSource.php:41
$request
error also a ContextSource you ll probably need to make sure the header is varied on $request
Definition: hooks.txt:2612
Linker\userToolLinksRedContribs
static userToolLinksRedContribs( $userId, $userText, $edits=null)
Alias for userToolLinks( $userId, $userText, true );.
Definition: Linker.php:978
ContextSource\msg
msg()
Get a Message object with context set Parameters are the same as wfMessage()
Definition: ContextSource.php:187
LinkBatch
Class representing a list of titles The execute() method checks them all for existence and adds them ...
Definition: LinkBatch.php:34
Linker\userLink
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
Definition: Linker.php:888
$lang
if(!isset( $args[0])) $lang
Definition: testCompression.php:33
Xml\label
static label( $label, $id, $attribs=[])
Convenience function to build an HTML form label.
Definition: Xml.php:358
captcha-old.count
count
Definition: captcha-old.py:225
UsersPager\getIndexField
getIndexField()
Definition: UsersPager.php:95
text
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
Definition: design.txt:12
UsersPager\buildGroupLink
buildGroupLink( $group, $username)
Format a link to a group description page.
Definition: UsersPager.php:395
UserGroupMembership\getGroupName
static getGroupName( $group)
Gets the localized friendly name for a group, if it exists.
Definition: UserGroupMembership.php:405
$result
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. Return false to stop further processing of the tag $reader:XMLReader object $logInfo:Array of information 'ImportHandlePageXMLTag':When parsing a XML tag in a page. Return false to stop further processing of the tag $reader:XMLReader object & $pageInfo:Array of information 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. Return false to stop further processing of the tag $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. Return false to stop further processing of the tag $reader:XMLReader object 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. Return false to stop further processing of the tag $reader:XMLReader object $revisionInfo:Array of information 'ImportLogInterwikiLink':Hook to change the interwiki link used in log entries and edit summaries for transwiki imports. & $fullInterwikiPrefix:Interwiki prefix, may contain colons. & $pageTitle:String that contains page title. 'ImportSources':Called when reading from the $wgImportSources configuration variable. Can be used to lazy-load the import sources list. & $importSources:The value of $wgImportSources. Modify as necessary. See the comment in DefaultSettings.php for the detail of how to structure this array. 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. & $title:Title object for the current page & $request:WebRequest & $ignoreRedirect:boolean to skip redirect check & $target:Title/string of redirect target & $article:Article object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) & $article:article(object) being checked 'IsTrustedProxy':Override the result of IP::isTrustedProxy() & $ip:IP being check & $result:Change this value to override the result of IP::isTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of Sanitizer::validateEmail(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetMagic':DEPRECATED! Use $magicWords in a file listed in $wgExtensionMessagesFiles instead. Use this to define synonyms of magic words depending of the language & $magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetSpecialPageAliases':DEPRECATED! Use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead. Use to define aliases of special pages names depending of the language & $specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code:language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Array with elements of the form "language:title" in the order that they will be output. & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LanguageSelector':Hook to change the language selector available on a page. $out:The output page. $cssClassName:CSS class name of the language selector. 'LinkBegin':DEPRECATED! Use HtmlPageLinkRendererBegin instead. Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
Definition: hooks.txt:1954
including
within a display generated by the Derivative if and wherever such third party notices normally appear The contents of the NOTICE file are for informational purposes only and do not modify the License You may add Your own attribution notices within Derivative Works that You alongside or as an addendum to the NOTICE text from the provided that such additional attribution notices cannot be construed as modifying the License You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for or distribution of Your or for any such Derivative Works as a provided Your and distribution of the Work otherwise complies with the conditions stated in this License Submission of Contributions Unless You explicitly state any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this without any additional terms or conditions Notwithstanding the nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions Trademarks This License does not grant permission to use the trade service or product names of the except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file Disclaimer of Warranty Unless required by applicable law or agreed to in Licensor provides the WITHOUT WARRANTIES OR CONDITIONS OF ANY either express or including
Definition: APACHE-LICENSE-2.0.txt:147
$user
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 account $user
Definition: hooks.txt:246
AlphabeticPager
IndexPager with an alphabetic list and a formatted navigation bar.
Definition: AlphabeticPager.php:28
ContextSource\getRequest
getRequest()
Get the WebRequest object.
Definition: ContextSource.php:78
UsersPager\__construct
__construct(IContextSource $context=null, $par=null, $including=null)
Definition: UsersPager.php:46
ContextSource\getUser
getUser()
Get the User object.
Definition: ContextSource.php:133
ContextSource\getTitle
getTitle()
Get the Title object.
Definition: ContextSource.php:88
UserGroupMembership\getGroupPage
static getGroupPage( $group)
Gets the title of a page describing a particular user group.
Definition: UserGroupMembership.php:430
IndexPager\DIR_ASCENDING
const DIR_ASCENDING
Constants for the $mDefaultDirection field.
Definition: IndexPager.php:75
UsersPager\getPageHeader
getPageHeader()
Definition: UsersPager.php:270
Xml\openElement
static openElement( $element, $attribs=null)
This opens an XML element.
Definition: Xml.php:109
php
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
Definition: injection.txt:35
Html\input
static input( $name, $value='', $type='text', array $attribs=[])
Convenience function to produce an "<input>" element.
Definition: Html.php:663
XmlSelect
Class for generating HTML <select> or <datalist> elements.
Definition: XmlSelect.php:26
ContextSource\getLanguage
getLanguage()
Get the Language object.
Definition: ContextSource.php:143
Xml\fieldset
static fieldset( $legend=false, $content=false, $attribs=[])
Shortcut for creating fieldsets.
Definition: Xml.php:577
$query
null for the wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query
Definition: hooks.txt:1572
UsersPager\getDefaultQuery
getDefaultQuery()
Preserve group and username offset parameters when paging.
Definition: UsersPager.php:358
wfScript
wfScript( $script='index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
Definition: GlobalFunctions.php:3138
UserGroupMembership\getLink
static getLink( $ugm, IContextSource $context, $format, $userName=null)
Gets a link for a user group, possibly including the expiry date if relevant.
Definition: UserGroupMembership.php:346
UsersPager\doBatchLookups
doBatchLookups()
Called from getBody(), before getStartBody() is called and after doQuery() was called.
Definition: UsersPager.php:221
wfGetDB
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3060
ContextSource\getOutput
getOutput()
Get the OutputPage object.
Definition: ContextSource.php:123
UserGroupMembership\newFromRow
static newFromRow( $row)
Creates a new UserGroupMembership object from a database row.
Definition: UserGroupMembership.php:92
UsersPager\$userGroupCache
array $userGroupCache
A array with user ids as key and a array of groups as value.
Definition: UsersPager.php:38
UsersPager
This class is used to get a list of user.
Definition: UsersPager.php:33
DB_REPLICA
const DB_REPLICA
Definition: defines.php:25
ContextSource\setContext
setContext(IContextSource $context)
Set the IContextSource object.
Definition: ContextSource.php:58
list
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
Definition: deferred.txt:11
UsersPager\getAllGroups
getAllGroups()
Get a list of all explicit groups.
Definition: UsersPager.php:344
UserGroupMembership\selectFields
static selectFields()
Returns the list of user_groups fields that should be selected to create a new user group membership.
Definition: UserGroupMembership.php:103
Html\hidden
static hidden( $name, $value, array $attribs=[])
Convenience function to produce an input element with type=hidden.
Definition: Html.php:746
Title\makeTitleSafe
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:538
NS_USER_TALK
const NS_USER_TALK
Definition: Defines.php:65
UsersPager\formatRow
formatRow( $row)
Definition: UsersPager.php:164
User\getAllGroups
static getAllGroups()
Return the set of defined explicit groups.
Definition: User.php:4860
IContextSource
Interface for objects which can provide a MediaWiki context on request.
Definition: IContextSource.php:55
UsersPager\getGroupMemberships
static getGroupMemberships( $uid, $cache=null)
Get an associative array containing groups the specified user belongs to, and the relevant UserGroupM...
Definition: UsersPager.php:379
IndexPager\DIR_DESCENDING
const DIR_DESCENDING
Definition: IndexPager.php:76
$self
$self
Definition: doMaintenance.php:56
UsersPager\getQueryInfo
getQueryInfo()
Definition: UsersPager.php:102
Xml\closeElement
static closeElement( $element)
Shortcut to close an XML element.
Definition: Xml.php:118
$dbr
if(! $regexes) $dbr
Definition: cleanup.php:94
$cache
$cache
Definition: mcc.php:33
User\idFromName
static idFromName( $name, $flags=self::READ_NORMAL)
Get database id given a user name.
Definition: User.php:759
as
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
Definition: distributors.txt:9
Html\rawElement
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
Definition: Html.php:209
NS_USER
const NS_USER
Definition: Defines.php:64
$batch
$batch
Definition: linkcache.txt:23
$t
$t
Definition: testCompression.php:67
Hooks\run
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
Definition: Hooks.php:131
$username
this hook is for auditing only or null if authentication failed before getting that far $username
Definition: hooks.txt:783
$options
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 or create your you must register them with $special registerFilterGroup 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
Definition: hooks.txt:1049
array
the array() calling protocol came about after MediaWiki 1.4rc1.
Xml\submitButton
static submitButton( $value, $attribs=[])
Convenience function to build an HTML submit button When $wgUseMediaWikiUIEverywhere is true it will ...
Definition: Xml.php:459
Xml\checkLabel
static checkLabel( $label, $name, $id, $checked=false, $attribs=[])
Convenience function to build an HTML checkbox with a label.
Definition: Xml.php:419
$out
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output $out
Definition: hooks.txt:783