Go to the documentation of this file.
49 $par = ( $par !== null ) ? $par :
'';
50 $parms = explode(
'/', $par );
51 $symsForAll =
array(
'*',
'user' );
53 if ( $parms[0] !=
'' &&
56 $this->requestedGroup = $par;
57 $un = $request->getText(
'username' );
58 } elseif ( count( $parms ) == 2 ) {
59 $this->requestedGroup = $parms[0];
62 $this->requestedGroup = $request->getVal(
'group' );
63 $un = ( $par !=
'' ) ? $par : $request->getText(
'username' );
66 if ( in_array( $this->requestedGroup, $symsForAll ) ) {
67 $this->requestedGroup =
'';
69 $this->editsOnly = $request->getBool(
'editsOnly' );
70 $this->creationSort = $request->getBool(
'creationSort' );
71 $this->including = $including;
72 $this->mDefaultDirection = $request->getBool(
'desc' );
74 $this->requestedUser =
'';
79 if ( !is_null( $username ) ) {
80 $this->requestedUser = $username->getText();
84 parent::__construct();
91 return $this->creationSort ?
'user_id' :
'user_name';
102 if ( !$this->
getUser()->isAllowed(
'hideuser' ) ) {
103 $conds[] =
'ipb_deleted IS NULL OR ipb_deleted = 0';
108 if ( $this->requestedGroup !=
'' ) {
109 $conds[
'ug_group'] = $this->requestedGroup;
112 if ( $this->requestedUser !=
'' ) {
113 # Sorted either by account creation or name
114 if ( $this->creationSort ) {
115 $conds[] =
'user_id >= ' . intval(
User::idFromName( $this->requestedUser ) );
117 $conds[] =
'user_name >= ' .
$dbr->addQuotes( $this->requestedUser );
121 if ( $this->editsOnly ) {
122 $conds[] =
'user_editcount > 0';
125 $options[
'GROUP BY'] = $this->creationSort ?
'user_id' :
'user_name';
128 'tables' =>
array(
'user',
'user_groups',
'ipblocks' ),
130 'user_name' => $this->creationSort ?
'MAX(user_name)' :
'user_name',
131 'user_id' => $this->creationSort ?
'user_id' :
'MAX(user_id)',
132 'edits' =>
'MAX(user_editcount)',
133 'numgroups' =>
'COUNT(ug_group)',
134 'singlegroup' =>
'MAX(ug_group)',
135 'creation' =>
'MIN(user_registration)',
136 'ipb_deleted' =>
'MAX(ipb_deleted)'
139 'join_conds' =>
array(
140 'user_groups' =>
array(
'LEFT JOIN',
'user_id=ug_user' ),
161 if ( $row->user_id == 0 ) { #
Bug 16487
165 $userName = $row->user_name;
179 if ( !$this->including && count( $groups_list ) > 0 ) {
181 foreach ( $groups_list
as $group ) {
184 $groups = $lang->commaList( $list );
187 $item = $lang->specialList( $ulinks, $groups );
189 if ( $row->ipb_deleted ) {
190 $item =
"<span class=\"deleted\">$item</span>";
195 if ( !$this->including && $wgEdititis ) {
198 $this->
msg(
'usereditcount' )->numParams( $row->edits )->escaped() .
203 # Some rows may be null
204 if ( !$this->including && $row->creation ) {
206 $d = $lang->userDate( $row->creation,
$user );
207 $t = $lang->userTime( $row->creation,
$user );
208 $created = $this->
msg(
'usercreated', $d,
$t, $row->user_name )->escaped();
209 $created =
' ' . $this->
msg(
'parentheses' )->rawParams( $created )->escaped();
211 $blocked = !is_null( $row->ipb_deleted ) ?
212 ' ' . $this->
msg(
'listusers-blocked', $userName )->escaped() :
222 # Give some pointers to make user links
223 foreach ( $this->mResult
as $row ) {
228 $this->mResult->rewind();
242 array(
'method' =>
'get',
'action' => $wgScript,
'id' =>
'mw-listusers-form' )
251 $this->requestedUser,
256 'autofocus' => $this->requestedUser ===
''
260 # Group drop-down list
265 $out .=
Xml::option( $groupText, $group, $group == $this->requestedGroup );
269 $this->
msg(
'listusers-editsonly' )->
text(),
276 $this->
msg(
'listusers-creationsort' )->
text(),
283 $this->
msg(
'listusers-desc' )->
text(),
286 $this->mDefaultDirection
292 # Submit button and form bottom
321 $query = parent::getDefaultQuery();
322 if ( $this->requestedGroup !=
'' ) {
323 $query[
'group'] = $this->requestedGroup;
325 if ( $this->requestedUser !=
'' ) {
326 $query[
'username'] = $this->requestedUser;
354 return User::makeGroupLinkHtml(
369 parent::__construct(
'Listusers' );
383 # getBody() first to check, if empty
384 $usersbody = $up->getBody();
388 $s = $up->getPageHeader();
392 $s .= $up->getNavigationBar();
394 $s .= $up->getNavigationBar();
396 $s .= $this->
msg(
'listusers-noresult' )->parseAsBlock();
414 parent::__construct(
'Listadmins',
'Listusers',
'sysop' );
425 parent::__construct(
'Listbots',
'Listusers',
'bot' );
static checkLabel( $label, $name, $id, $checked=false, $attribs=array())
Convenience function to build an HTML checkbox with a label.
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. $reader:XMLReader object $logInfo:Array of information Return false to stop further processing of the tag 'ImportHandlePageXMLTag':When parsing a XML tag in a page. $reader:XMLReader object $pageInfo:Array of information Return false to stop further processing of the tag 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information Return false to stop further processing of the tag 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. $reader:XMLReader object Return false to stop further processing of the tag 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. $reader:XMLReader object $revisionInfo:Array of information Return false to stop further processing of the tag '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 '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. '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 '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 '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 wfIsTrustedProxy() $ip:IP being check $result:Change this value to override the result of wfIsTrustedProxy() '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 User::isValidEmailAddr(), 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. '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 '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) '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:Associative array mapping language codes to prefixed links of the form "language:title". & $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. 'LinkBegin':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
static newFromId( $id)
Static factory method for creation from a given user ID.
Redirect page: Special:ListAdmins --> Special:ListUsers/sysop.
static userToolLinksRedContribs( $userId, $userText, $edits=null)
Alias for userToolLinks( $userId, $userText, true );.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
msg()
Get a Message object with context set Parameters are the same as wfMessage()
Class representing a list of titles The execute() method checks them all for existence and adds them ...
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
getOutput()
Get the OutputPage being used for this instance.
execute( $par)
Show the special page.
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
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
static option( $text, $value=null, $selected=false, $attribs=array())
Convenience function to build an HTML drop-down list item.
Shortcut to construct an includable special page.
static hidden( $name, $value, $attribs=array())
Convenience function to produce an input element with type=hidden.
getRequest()
Get the WebRequest object.
getUser()
Get the User object.
getTitle()
Get the Title object.
static openElement( $element, $attribs=null)
This opens an XML element.
getLanguage()
Get the Language object.
__construct()
Constructor.
static getImplicitGroups()
Get a list of implicit groups.
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
when a variable name is used in a it is silently declared as a new masking the global
Redirect page: Special:ListBots --> Special:ListUsers/bot.
setContext(IContextSource $context)
Set the IContextSource object.
static input( $name, $value='', $type='text', $attribs=array())
Convenience function to produce an "<input>" element.
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
getContext()
Gets the context this SpecialPage is executed in.
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
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
msg()
Wrapper around wfMessage that sets the current context.
static getAllGroups()
Return the set of defined explicit groups.
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
static getGroupMember( $group, $username='#')
Get the localized descriptive name for a member of a group, if it exists.
Interface for objects which can provide a context on request.
static getGroupName( $group)
Get the localized descriptive name for a group, if it exists.
static idFromName( $name)
Get database id given a user name.
static closeElement( $element)
Shortcut to close an XML element.
</pre > ! end ! test Regression with preformatted in< center > ! wikitext< center > Blah</center > ! html< center >< pre > Blah</pre ></center > ! end ! test Bug
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
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
static submitButton( $value, $attribs=array())
Convenience function to build an HTML submit button.
static rawElement( $element, $attribs=array(), $contents='')
Returns an HTML element in a string.
static label( $label, $id, $attribs=array())
Convenience function to build an HTML form label.
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
including( $x=null)
Whether the special page is being evaluated via transclusion.
static fieldset( $legend=false, $content=false, $attribs=array())
Shortcut for creating fieldsets.