MediaWiki  1.23.2
SpecialBlockList.php
Go to the documentation of this file.
1 <?php
30 
31  protected $target, $options;
32 
33  function __construct() {
34  parent::__construct( 'BlockList' );
35  }
36 
42  public function execute( $par ) {
43  $this->setHeaders();
44  $this->outputHeader();
45  $out = $this->getOutput();
46  $lang = $this->getLanguage();
47  $out->setPageTitle( $this->msg( 'ipblocklist' ) );
48  $out->addModuleStyles( 'mediawiki.special' );
49 
50  $request = $this->getRequest();
51  $par = $request->getVal( 'ip', $par );
52  $this->target = trim( $request->getVal( 'wpTarget', $par ) );
53 
54  $this->options = $request->getArray( 'wpOptions', array() );
55 
56  $action = $request->getText( 'action' );
57 
58  if ( $action == 'unblock' || $action == 'submit' && $request->wasPosted() ) {
59  # B/C @since 1.18: Unblock interface is now at Special:Unblock
60  $title = SpecialPage::getTitleFor( 'Unblock', $this->target );
61  $out->redirect( $title->getFullURL() );
62 
63  return;
64  }
65 
66  # Just show the block list
67  $fields = array(
68  'Target' => array(
69  'type' => 'text',
70  'label-message' => 'ipadressorusername',
71  'tabindex' => '1',
72  'size' => '45',
73  'default' => $this->target,
74  ),
75  'Options' => array(
76  'type' => 'multiselect',
77  'options' => array(
78  $this->msg( 'blocklist-userblocks' )->text() => 'userblocks',
79  $this->msg( 'blocklist-tempblocks' )->text() => 'tempblocks',
80  $this->msg( 'blocklist-addressblocks' )->text() => 'addressblocks',
81  $this->msg( 'blocklist-rangeblocks' )->text() => 'rangeblocks',
82  ),
83  'flatlist' => true,
84  ),
85  'Limit' => array(
86  'class' => 'HTMLBlockedUsersItemSelect',
87  'label-message' => 'table_pager_limit_label',
88  'options' => array(
89  $lang->formatNum( 20 ) => 20,
90  $lang->formatNum( 50 ) => 50,
91  $lang->formatNum( 100 ) => 100,
92  $lang->formatNum( 250 ) => 250,
93  $lang->formatNum( 500 ) => 500,
94  ),
95  'name' => 'limit',
96  'default' => 50,
97  ),
98  );
99  $context = new DerivativeContext( $this->getContext() );
100  $context->setTitle( $this->getPageTitle() ); // Remove subpage
101  $form = new HTMLForm( $fields, $context );
102  $form->setMethod( 'get' );
103  $form->setWrapperLegendMsg( 'ipblocklist-legend' );
104  $form->setSubmitTextMsg( 'ipblocklist-submit' );
105  $form->prepareForm();
106 
107  $form->displayForm( '' );
108  $this->showList();
109  }
110 
111  function showList() {
112  # Purge expired entries on one in every 10 queries
113  if ( !mt_rand( 0, 10 ) ) {
115  }
116 
117  $conds = array();
118  # Is the user allowed to see hidden blocks?
119  if ( !$this->getUser()->isAllowed( 'hideuser' ) ) {
120  $conds['ipb_deleted'] = 0;
121  }
122 
123  if ( $this->target !== '' ) {
124  list( $target, $type ) = Block::parseTarget( $this->target );
125 
126  switch ( $type ) {
127  case Block::TYPE_ID:
128  case Block::TYPE_AUTO:
129  $conds['ipb_id'] = $target;
130  break;
131 
132  case Block::TYPE_IP:
133  case Block::TYPE_RANGE:
134  list( $start, $end ) = IP::parseRange( $target );
135  $dbr = wfGetDB( DB_SLAVE );
136  $conds[] = $dbr->makeList(
137  array(
138  'ipb_address' => $target,
139  Block::getRangeCond( $start, $end )
140  ),
141  LIST_OR
142  );
143  $conds['ipb_auto'] = 0;
144  break;
145 
146  case Block::TYPE_USER:
147  $conds['ipb_address'] = $target->getName();
148  $conds['ipb_auto'] = 0;
149  break;
150  }
151  }
152 
153  # Apply filters
154  if ( in_array( 'userblocks', $this->options ) ) {
155  $conds['ipb_user'] = 0;
156  }
157  if ( in_array( 'tempblocks', $this->options ) ) {
158  $conds['ipb_expiry'] = 'infinity';
159  }
160  if ( in_array( 'addressblocks', $this->options ) ) {
161  $conds[] = "ipb_user != 0 OR ipb_range_end > ipb_range_start";
162  }
163  if ( in_array( 'rangeblocks', $this->options ) ) {
164  $conds[] = "ipb_range_end = ipb_range_start";
165  }
166 
167  # Check for other blocks, i.e. global/tor blocks
168  $otherBlockLink = array();
169  wfRunHooks( 'OtherBlockLogLink', array( &$otherBlockLink, $this->target ) );
170 
171  $out = $this->getOutput();
172 
173  # Show additional header for the local block only when other blocks exists.
174  # Not necessary in a standard installation without such extensions enabled
175  if ( count( $otherBlockLink ) ) {
176  $out->addHTML(
177  Html::element( 'h2', array(), $this->msg( 'ipblocklist-localblock' )->text() ) . "\n"
178  );
179  }
180 
181  $pager = new BlockListPager( $this, $conds );
182  if ( $pager->getNumRows() ) {
183  $out->addHTML(
184  $pager->getNavigationBar() .
185  $pager->getBody() .
186  $pager->getNavigationBar()
187  );
188  } elseif ( $this->target ) {
189  $out->addWikiMsg( 'ipblocklist-no-results' );
190  } else {
191  $out->addWikiMsg( 'ipblocklist-empty' );
192  }
193 
194  if ( count( $otherBlockLink ) ) {
195  $out->addHTML(
197  'h2',
198  array(),
199  $this->msg( 'ipblocklist-otherblocks', count( $otherBlockLink ) )->parse()
200  ) . "\n"
201  );
202  $list = '';
203  foreach ( $otherBlockLink as $link ) {
204  $list .= Html::rawElement( 'li', array(), $link ) . "\n";
205  }
206  $out->addHTML( Html::rawElement( 'ul', array( 'class' => 'mw-ipblocklist-otherblocks' ), $list ) . "\n" );
207  }
208  }
209 
210  protected function getGroupName() {
211  return 'users';
212  }
213 }
214 
215 class BlockListPager extends TablePager {
216  protected $conds;
217  protected $page;
218 
223  function __construct( $page, $conds ) {
224  $this->page = $page;
225  $this->conds = $conds;
226  $this->mDefaultDirection = true;
227  parent::__construct( $page->getContext() );
228  }
229 
230  function getFieldNames() {
231  static $headers = null;
232 
233  if ( $headers === null ) {
234  $headers = array(
235  'ipb_timestamp' => 'blocklist-timestamp',
236  'ipb_target' => 'blocklist-target',
237  'ipb_expiry' => 'blocklist-expiry',
238  'ipb_by' => 'blocklist-by',
239  'ipb_params' => 'blocklist-params',
240  'ipb_reason' => 'blocklist-reason',
241  );
242  foreach ( $headers as $key => $val ) {
243  $headers[$key] = $this->msg( $val )->text();
244  }
245  }
246 
247  return $headers;
248  }
249 
250  function formatValue( $name, $value ) {
251  static $msg = null;
252  if ( $msg === null ) {
253  $msg = array(
254  'anononlyblock',
255  'createaccountblock',
256  'noautoblockblock',
257  'emailblock',
258  'blocklist-nousertalk',
259  'unblocklink',
260  'change-blocklink',
261  'infiniteblock',
262  );
263  $msg = array_combine( $msg, array_map( array( $this, 'msg' ), $msg ) );
264  }
265 
267  $row = $this->mCurrentRow;
268 
269  $formatted = '';
270 
271  switch ( $name ) {
272  case 'ipb_timestamp':
273  $formatted = $this->getLanguage()->userTimeAndDate( $value, $this->getUser() );
274  break;
275 
276  case 'ipb_target':
277  if ( $row->ipb_auto ) {
278  $formatted = $this->msg( 'autoblockid', $row->ipb_id )->parse();
279  } else {
280  list( $target, $type ) = Block::parseTarget( $row->ipb_address );
281  switch ( $type ) {
282  case Block::TYPE_USER:
283  case Block::TYPE_IP:
284  $formatted = Linker::userLink( $target->getId(), $target );
285  $formatted .= Linker::userToolLinks(
286  $target->getId(),
287  $target,
288  false,
290  );
291  break;
292  case Block::TYPE_RANGE:
293  $formatted = htmlspecialchars( $target );
294  }
295  }
296  break;
297 
298  case 'ipb_expiry':
299  $formatted = $this->getLanguage()->formatExpiry( $value, /* User preference timezone */true );
300  if ( $this->getUser()->isAllowed( 'block' ) ) {
301  if ( $row->ipb_auto ) {
302  $links[] = Linker::linkKnown(
303  SpecialPage::getTitleFor( 'Unblock' ),
304  $msg['unblocklink'],
305  array(),
306  array( 'wpTarget' => "#{$row->ipb_id}" )
307  );
308  } else {
309  $links[] = Linker::linkKnown(
310  SpecialPage::getTitleFor( 'Unblock', $row->ipb_address ),
311  $msg['unblocklink']
312  );
313  $links[] = Linker::linkKnown(
314  SpecialPage::getTitleFor( 'Block', $row->ipb_address ),
315  $msg['change-blocklink']
316  );
317  }
318  $formatted .= ' ' . Html::rawElement(
319  'span',
320  array( 'class' => 'mw-blocklist-actions' ),
321  $this->msg( 'parentheses' )->rawParams(
322  $this->getLanguage()->pipeList( $links ) )->escaped()
323  );
324  }
325  break;
326 
327  case 'ipb_by':
328  if ( isset( $row->by_user_name ) ) {
329  $formatted = Linker::userLink( $value, $row->by_user_name );
330  $formatted .= Linker::userToolLinks( $value, $row->by_user_name );
331  } else {
332  $formatted = htmlspecialchars( $row->ipb_by_text ); // foreign user?
333  }
334  break;
335 
336  case 'ipb_reason':
337  $formatted = Linker::formatComment( $value );
338  break;
339 
340  case 'ipb_params':
341  $properties = array();
342  if ( $row->ipb_anon_only ) {
343  $properties[] = $msg['anononlyblock'];
344  }
345  if ( $row->ipb_create_account ) {
346  $properties[] = $msg['createaccountblock'];
347  }
348  if ( $row->ipb_user && !$row->ipb_enable_autoblock ) {
349  $properties[] = $msg['noautoblockblock'];
350  }
351 
352  if ( $row->ipb_block_email ) {
353  $properties[] = $msg['emailblock'];
354  }
355 
356  if ( !$row->ipb_allow_usertalk ) {
357  $properties[] = $msg['blocklist-nousertalk'];
358  }
359 
360  $formatted = $this->getLanguage()->commaList( $properties );
361  break;
362 
363  default:
364  $formatted = "Unable to format $name";
365  break;
366  }
367 
368  return $formatted;
369  }
370 
371  function getQueryInfo() {
372  $info = array(
373  'tables' => array( 'ipblocks', 'user' ),
374  'fields' => array(
375  'ipb_id',
376  'ipb_address',
377  'ipb_user',
378  'ipb_by',
379  'ipb_by_text',
380  'by_user_name' => 'user_name',
381  'ipb_reason',
382  'ipb_timestamp',
383  'ipb_auto',
384  'ipb_anon_only',
385  'ipb_create_account',
386  'ipb_enable_autoblock',
387  'ipb_expiry',
388  'ipb_range_start',
389  'ipb_range_end',
390  'ipb_deleted',
391  'ipb_block_email',
392  'ipb_allow_usertalk',
393  ),
394  'conds' => $this->conds,
395  'join_conds' => array( 'user' => array( 'LEFT JOIN', 'user_id = ipb_by' ) )
396  );
397 
398  # Is the user allowed to see hidden blocks?
399  if ( !$this->getUser()->isAllowed( 'hideuser' ) ) {
400  $info['conds']['ipb_deleted'] = 0;
401  }
402 
403  return $info;
404  }
405 
406  public function getTableClass() {
407  return 'TablePager mw-blocklist';
408  }
409 
410  function getIndexField() {
411  return 'ipb_timestamp';
412  }
413 
414  function getDefaultSort() {
415  return 'ipb_timestamp';
416  }
417 
418  function isFieldSortable( $name ) {
419  return false;
420  }
421 
427  wfProfileIn( __METHOD__ );
428  # Do a link batch query
429  $lb = new LinkBatch;
430  $lb->setCaller( __METHOD__ );
431 
432  $userids = array();
433 
434  foreach ( $result as $row ) {
435  $userids[] = $row->ipb_by;
436 
437  # Usernames and titles are in fact related by a simple substitution of space -> underscore
438  # The last few lines of Title::secureAndSplit() tell the story.
439  $name = str_replace( ' ', '_', $row->ipb_address );
440  $lb->add( NS_USER, $name );
441  $lb->add( NS_USER_TALK, $name );
442  }
443 
444  $ua = UserArray::newFromIDs( $userids );
445  foreach ( $ua as $user ) {
446  $name = str_replace( ' ', '_', $user->getName() );
447  $lb->add( NS_USER, $name );
448  $lb->add( NS_USER_TALK, $name );
449  }
450 
451  $lb->execute();
452  wfProfileOut( __METHOD__ );
453  }
454 }
455 
468  function validate( $value, $alldata ) {
469  if ( $value == '' ) {
470  return true;
471  }
472 
473  // Let folks pick an explicit limit not from our list, as long as it's a real numbr.
474  if ( !in_array( $value, $this->mParams['options'] ) && $value == intval( $value ) && $value > 0 ) {
475  // This adds the explicitly requested limit value to the drop-down,
476  // then makes sure it's sorted correctly so when we output the list
477  // later, the custom option doesn't just show up last.
478  $this->mParams['options'][$this->mParent->getLanguage()->formatNum( $value )] = intval( $value );
479  asort( $this->mParams['options'] );
480  }
481 
482  return true;
483  }
484 }
SpecialPage\getPageTitle
getPageTitle( $subpage=false)
Get a self-referential title object.
Definition: SpecialPage.php:488
$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. $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
Definition: hooks.txt:1528
Linker\TOOL_LINKS_NOBLOCK
const TOOL_LINKS_NOBLOCK
Flags for userToolLinks()
Definition: Linker.php:37
SpecialBlockList\execute
execute( $par)
Main execution point.
Definition: SpecialBlockList.php:42
php
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
Definition: skin.txt:62
BlockListPager\isFieldSortable
isFieldSortable( $name)
Return true if the named field should be sortable by the UI, false otherwise.
Definition: SpecialBlockList.php:418
ContextSource\msg
msg()
Get a Message object with context set Parameters are the same as wfMessage()
Definition: ContextSource.php:175
LinkBatch
Class representing a list of titles The execute() method checks them all for existence and adds them ...
Definition: LinkBatch.php:30
Linker\userLink
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
Definition: Linker.php:1072
SpecialPage\getOutput
getOutput()
Get the OutputPage being used for this instance.
Definition: SpecialPage.php:535
TablePager\$mCurrentRow
$mCurrentRow
Definition: Pager.php:927
Block\TYPE_IP
const TYPE_IP
Definition: Block.php:48
Block\TYPE_RANGE
const TYPE_RANGE
Definition: Block.php:49
wfGetDB
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3650
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
BlockListPager
Definition: SpecialBlockList.php:215
$form
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead $form
Definition: hooks.txt:2573
SpecialBlockList\$options
$options
Definition: SpecialBlockList.php:31
wfProfileIn
wfProfileIn( $functionname)
Begin profiling of a function.
Definition: Profiler.php:33
BlockListPager\$conds
$conds
Definition: SpecialBlockList.php:216
SpecialPage\getTitleFor
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
Definition: SpecialPage.php:74
SpecialPage\getLanguage
getLanguage()
Shortcut to get user's language.
Definition: SpecialPage.php:578
Linker\formatComment
static formatComment( $comment, $title=null, $local=false)
This function is called by all recent changes variants, by the page history, and by the user contribu...
Definition: Linker.php:1254
ContextSource\getUser
getUser()
Get the User object.
Definition: ContextSource.php:132
$link
set to $title object and return false for a match for latest after cache objects are set use the ContentHandler facility to handle CSS and JavaScript for highlighting & $link
Definition: hooks.txt:2149
SpecialBlockList\showList
showList()
Definition: SpecialBlockList.php:111
Linker\linkKnown
static linkKnown( $target, $html=null, $customAttribs=array(), $query=array(), $options=array( 'known', 'noclasses'))
Identical to link(), except $options defaults to 'known'.
Definition: Linker.php:264
$dbr
$dbr
Definition: testCompression.php:48
ContextSource\getLanguage
getLanguage()
Get the Language object.
Definition: ContextSource.php:154
HTMLSelectField
A select dropdown field.
Definition: HTMLSelectField.php:6
SpecialBlockList\$target
$target
Definition: SpecialBlockList.php:31
DerivativeContext
An IContextSource implementation which will inherit context from another source but allow individual ...
Definition: DerivativeContext.php:32
$lb
if( $wgAPIRequestLog) $lb
Definition: api.php:126
LIST_OR
const LIST_OR
Definition: Defines.php:206
$out
$out
Definition: UtfNormalGenerate.php:167
Block\parseTarget
static parseTarget( $target)
From an existing Block, get the target and the type of target.
Definition: Block.php:1194
Html\element
static element( $element, $attribs=array(), $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
Definition: Html.php:148
Block\getRangeCond
static getRangeCond( $start, $end=null)
Get a set of SQL conditions which will select rangeblocks encompassing a given range.
Definition: Block.php:279
Block\TYPE_ID
const TYPE_ID
Definition: Block.php:51
BlockListPager\getTableClass
getTableClass()
Definition: SpecialBlockList.php:406
TablePager
Table-based display with a user-selectable sort order.
Definition: Pager.php:925
wfProfileOut
wfProfileOut( $functionname='missing')
Stop profiling of a function.
Definition: Profiler.php:46
BlockListPager\__construct
__construct( $page, $conds)
Definition: SpecialBlockList.php:223
BlockListPager\getFieldNames
getFieldNames()
An array mapping database field names to a textual description of the field name, for use in the tabl...
Definition: SpecialBlockList.php:230
wfRunHooks
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
Definition: GlobalFunctions.php:4001
HTMLBlockedUsersItemSelect
Items per page dropdown.
Definition: SpecialBlockList.php:459
BlockListPager\getDefaultSort
getDefaultSort()
The database field name used as a default sort order.
Definition: SpecialBlockList.php:414
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
SpecialPage\setHeaders
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
Definition: SpecialPage.php:352
SpecialPage\getUser
getUser()
Shortcut to get the User executing this instance.
Definition: SpecialPage.php:545
UserArray\newFromIDs
static newFromIDs( $ids)
Definition: UserArray.php:43
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
SpecialPage\getContext
getContext()
Gets the context this SpecialPage is executed in.
Definition: SpecialPage.php:508
SpecialBlockList\__construct
__construct()
Definition: SpecialBlockList.php:33
BlockListPager\getIndexField
getIndexField()
Definition: SpecialBlockList.php:410
$title
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
NS_USER_TALK
const NS_USER_TALK
Definition: Defines.php:82
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
$value
$value
Definition: styleTest.css.php:45
Linker\userToolLinks
static userToolLinks( $userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
Generate standard user tool links (talk, contributions, block link, etc.)
Definition: Linker.php:1100
SpecialPage\msg
msg()
Wrapper around wfMessage that sets the current context.
Definition: SpecialPage.php:609
SpecialPage
Parent class for all special pages.
Definition: SpecialPage.php:33
options
We ve cleaned up the code here by removing clumps of infrequently used code and moving them off somewhere else It s much easier for someone working with this code to see what s _really_ going and make changes or fix bugs In we can take all the code that deals with the little used title reversing options(say) and put it in one place. Instead of having little title-reversing if-blocks spread all over the codebase in showAnArticle
IP\parseRange
static parseRange( $range)
Given a string range in a number of formats, return the start and end of the range in hexadecimal.
Definition: IP.php:564
BlockListPager\$page
$page
Definition: SpecialBlockList.php:217
SpecialPage\getRequest
getRequest()
Get the WebRequest being used for this instance.
Definition: SpecialPage.php:525
BlockListPager\getQueryInfo
getQueryInfo()
This function should be overridden to provide all parameters needed for the main paged query.
Definition: SpecialBlockList.php:371
SpecialBlockList\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialBlockList.php:210
Block\purgeExpired
static purgeExpired()
Purge expired blocks from the ipblocks table.
Definition: Block.php:937
Block\TYPE_AUTO
const TYPE_AUTO
Definition: Block.php:50
$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:237
Block\TYPE_USER
const TYPE_USER
Definition: Block.php:47
DB_SLAVE
const DB_SLAVE
Definition: Defines.php:55
SpecialBlockList
A special page that lists existing blocks.
Definition: SpecialBlockList.php:29
BlockListPager\preprocessResults
preprocessResults( $result)
Do a LinkBatch query to minimise database load when generating all these links.
Definition: SpecialBlockList.php:426
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
NS_USER
const NS_USER
Definition: Defines.php:81
Html\rawElement
static rawElement( $element, $attribs=array(), $contents='')
Returns an HTML element in a string.
Definition: Html.php:124
HTMLBlockedUsersItemSelect\validate
validate( $value, $alldata)
Basically don't do any validation.
Definition: SpecialBlockList.php:468
SpecialPage\outputHeader
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
Definition: SpecialPage.php:443
BlockListPager\formatValue
formatValue( $name, $value)
Format a table cell.
Definition: SpecialBlockList.php:250
page
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk page
Definition: hooks.txt:1956
HTMLForm
Object handling generic submission, CSRF protection, layout and other logic for UI forms.
Definition: HTMLForm.php:100
$type
$type
Definition: testCompression.php:46