35 parent::__construct(
'BlockList' );
45 $out->setPageTitle( $this->
msg(
'ipblocklist' ) );
46 $out->addModuleStyles( [
'mediawiki.special' ] );
49 $par =
$request->getVal(
'ip', $par );
50 $this->target =
trim(
$request->getVal(
'wpTarget', $par ) );
54 $action =
$request->getText(
'action' );
56 if ( $action ==
'unblock' || $action ==
'submit' &&
$request->wasPosted() ) {
57 # B/C @since 1.18: Unblock interface is now at Special:Unblock
59 $out->redirect( $title->getFullURL() );
64 # setup BlockListPager here to get the actual default Limit
67 # Just show the block list
71 'label-message' =>
'ipaddressorusername',
77 'type' =>
'multiselect',
78 'options-messages' => [
79 'blocklist-userblocks' =>
'userblocks',
80 'blocklist-tempblocks' =>
'tempblocks',
81 'blocklist-addressblocks' =>
'addressblocks',
82 'blocklist-rangeblocks' =>
'rangeblocks',
87 'type' =>
'limitselect',
88 'label-message' =>
'table_pager_limit_label',
89 'options' => $pager->getLimitSelectList(),
91 'default' => $pager->getLimit(),
96 $form = HTMLForm::factory(
'ooui', $fields,
$context );
99 ->setFormIdentifier(
'blocklist' )
100 ->setWrapperLegendMsg(
'ipblocklist-legend' )
101 ->setSubmitTextMsg(
'ipblocklist-submit' )
103 ->displayForm(
false );
114 # Is the user allowed to see hidden blocks?
115 if ( !$this->
getUser()->isAllowed(
'hideuser' ) ) {
116 $conds[
'ipb_deleted'] = 0;
119 if ( $this->target !==
'' ) {
138 $conds[
'ipb_auto'] = 0;
142 $conds[
'ipb_address'] =
$target->getName();
143 $conds[
'ipb_auto'] = 0;
150 $conds[
'ipb_user'] = 0;
153 $conds[
'ipb_expiry'] =
'infinity';
156 $conds[] =
"ipb_user != 0 OR ipb_range_end > ipb_range_start";
159 $conds[] =
"ipb_range_end = ipb_range_start";
172 # Check for other blocks, i.e. global/tor blocks
173 $otherBlockLink = [];
174 Hooks::run(
'OtherBlockLogLink', [ &$otherBlockLink, $this->target ] );
176 # Show additional header for the local block only when other blocks exists.
177 # Not necessary in a standard installation without such extensions enabled
178 if ( count( $otherBlockLink ) ) {
180 Html::element(
'h2', [], $this->
msg(
'ipblocklist-localblock' )->
text() ) .
"\n"
186 }
elseif ( $this->target ) {
187 $out->addWikiMsg(
'ipblocklist-no-results' );
189 $out->addWikiMsg(
'ipblocklist-empty' );
192 if ( count( $otherBlockLink ) ) {
197 $this->
msg(
'ipblocklist-otherblocks', count( $otherBlockLink ) )->parse()
201 foreach ( $otherBlockLink as
$link ) {
202 $list .= Html::rawElement(
'li', [],
$link ) .
"\n";
204 $out->addHTML( Html::rawElement(
206 [
'class' =>
'mw-ipblocklist-otherblocks' ],
This list may contain false positives That usually means there is additional text with links below the first Each row contains links to the first and second as well as the first line of the second redirect text
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
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
static getRangeCond( $start, $end=null)
Get a set of SQL conditions which will select rangeblocks encompassing a given range.
static parseTarget( $target)
From an existing Block, get the target and the type of target.
An IContextSource implementation which will inherit context from another source but allow individual ...
A special page that lists existing blocks.
showList(BlockListPager $pager)
Show the list of blocked accounts matching the actual filter.
getBlockListPager()
Setup a new BlockListPager instance.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Parent class for all special pages.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getOutput()
Get the OutputPage being used for this instance.
getUser()
Shortcut to get the User executing this instance.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
getContext()
Gets the context this SpecialPage is executed in.
msg( $key)
Wrapper around wfMessage that sets the current context.
getRequest()
Get the WebRequest being used for this instance.
getPageTitle( $subpage=false)
Get a self-referential title object.
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
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 $request
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not it can be in the form of< username >< more info > e g for bot passwords intended to be added to log contexts Fields it might only if the login was with a bot password 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
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
Using a hook running we can avoid having all this option specific stuff in our mainline code Using the function 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
usually copyright or history_copyright This message must be in HTML not wikitext & $link