136 parent::__construct(
'Block',
'block' );
138 $this->blockUtils = $blockUtils;
139 $this->blockPermissionCheckerFactory = $blockPermissionCheckerFactory;
140 $this->blockUserFactory = $blockUserFactory;
141 $this->blockStore = $blockStore;
142 $this->userNameUtils = $userNameUtils;
143 $this->userNamePrefixSearch = $userNamePrefixSearch;
144 $this->blockActionInfo = $blockActionInfo;
145 $this->titleFormatter = $titleFormatter;
146 $this->namespaceInfo = $namespaceInfo;
152 parent::execute(
$par );
154 if ( $this->useCodex ) {
155 $this->codexFormData[
'blockTargetUser' ] = $this->target instanceof
UserIdentity ?
157 $this->target ??
null;
158 $this->
getOutput()->addJsConfigVars( $this->codexFormData );
173 parent::checkExecutePermissions( $user );
175 $status = $this->blockPermissionCheckerFactory
176 ->newBlockPermissionChecker( $this->target, $user )
177 ->checkBlockPermissions();
178 if ( $status !==
true ) {
206 $this->
getSkin()->setRelevantUser( $this->target );
210 ->parseBlockTarget( $request->getVal(
'wpPreviousTarget' ) );
211 $this->requestedHideUser = $request->getBool(
'wpHideUser' );
213 if ( $this->useCodex ) {
215 $givenExpiry = $request->getVal(
'wpExpiry',
'' );
217 $this->codexFormData[
'blockExpiryPreset' ] =
'infinite';
219 $expiry = date_parse( $givenExpiry );
220 $this->codexFormData[
'blockExpiryPreset' ] = isset( $expiry[
'relative' ] ) ?
224 $this->formatExpiryForHtml( $request->getVal(
'wpExpiry',
'' ) );
227 $this->codexFormData[
'blockTypePreset' ] =
228 $request->getVal(
'wpEditingRestriction' ) ===
'sitewide' ||
229 $request->getVal(
'wpEditingRestriction' ) ===
'partial' ?
230 $request->getVal(
'wpEditingRestriction' ) :
232 $this->codexFormData[
'blockReasonPreset' ] = $request->getVal(
'wpReason' );
233 $this->codexFormData[
'blockReasonOtherPreset' ] = $request->getVal(
'wpReason-other' );
234 $blockAdditionalDetailsPreset = $blockDetailsPreset = [];
236 if ( $request->getBool(
'wpCreateAccount' ) ) {
237 $blockDetailsPreset[] =
'wpCreateAccount';
240 if ( $request->getBool(
'wpDisableEmail' ) ) {
241 $blockDetailsPreset[] =
'wpDisableEmail';
244 if ( $request->getBool(
'wpDisableUTEdit' ) ) {
245 $blockDetailsPreset[] =
'wpDisableUTEdit';
248 if ( $request->getVal(
'wpAutoBlock' ) !==
'0' ) {
249 $blockAdditionalDetailsPreset[] =
'wpAutoBlock';
252 if ( $request->getBool(
'wpWatch' ) ) {
253 $blockAdditionalDetailsPreset[] =
'wpWatch';
256 if ( $request->getBool(
'wpHideName' ) ) {
257 $blockAdditionalDetailsPreset[] =
'wpHideName';
260 if ( $request->getBool(
'wpHardBlock' ) ) {
261 $blockAdditionalDetailsPreset[] =
'wpHardBlock';
264 $this->codexFormData[
'blockDetailsPreset' ] = $blockDetailsPreset;
265 $this->codexFormData[
'blockAdditionalDetailsPreset' ] = $blockAdditionalDetailsPreset;
266 $this->codexFormData[
'blockPageRestrictions' ] = $request->getVal(
'wpPageRestrictions' );
267 $this->codexFormData[
'blockNamespaceRestrictions' ] = $request->getVal(
'wpNamespaceRestrictions' );
280 $msg = $this->alreadyBlocked ?
'ipb-change-block' :
'ipbsubmit';
286 if ( !$this->
getRequest()->wasPosted() && $this->preErrors ) {
292 'errors' => array_map(
function ( $errMsg ) {
293 return new HtmlSnippet( $this->
msg( $errMsg )->parse() );
298 if ( $this->useCodex ) {
299 $this->codexFormData[
'blockPreErrors' ] = array_map(
function ( $errMsg ) {
300 return $this->
msg( $errMsg )->parse();
307 return $this->useCodex ?
'codex' :
'ooui';
322 $suggestedDurations = $this->
getLanguage()->getBlockDurations();
325 $this->
getRequest()->getBool(
'multiblocks' );
333 'id' =>
'mw-bi-target',
337 'placeholder' => $this->
msg(
'block-target-placeholder' )->text(),
338 'validation-callback' =>
function ( $value, $alldata, $form ) {
339 $status = $this->blockUtils->validateTarget( $value );
340 if ( !$status->isOK() ) {
341 $errors = $status->getMessages();
342 return $form->msg( $errors[0] );
346 'section' =>
'target',
349 $editingRestrictionOptions = $this->useCodex ?
352 'options-messages' => [
353 'ipb-sitewide' =>
'sitewide',
354 'ipb-partial' =>
'partial'
356 'option-descriptions-messages' => [
357 'sitewide' =>
'ipb-sitewide-help',
358 'partial' =>
'ipb-partial-help'
360 'option-descriptions-messages-parse' =>
true,
365 $this->
msg(
'ipb-sitewide' )->escaped() .
367 'classes' => [
'oo-ui-inline-help' ],
368 'label' =>
new HtmlSnippet( $this->
msg(
'ipb-sitewide-help' )->parse() ),
370 $this->
msg(
'ipb-partial' )->escaped() .
372 'classes' => [
'oo-ui-inline-help' ],
373 'label' =>
new HtmlSnippet( $this->
msg(
'ipb-partial-help' )->parse() ),
378 $a[
'EditingRestriction'] = [
380 'cssclass' =>
'mw-block-editing-restriction',
381 'default' =>
'sitewide',
382 'section' =>
'actions',
383 ] + $editingRestrictionOptions;
385 $a[
'PageRestrictions'] = [
386 'type' =>
'titlesmultiselect',
387 'label' => $this->
msg(
'ipb-pages-label' )->text(),
390 'cssclass' =>
'mw-htmlform-checkradio-indent mw-block-partial-restriction',
392 'showMissing' =>
false,
393 'excludeDynamicNamespaces' =>
true,
395 'autocomplete' => false
397 'section' =>
'actions',
400 $a[
'NamespaceRestrictions'] = [
401 'type' =>
'namespacesmultiselect',
402 'label' => $this->
msg(
'ipb-namespaces-label' )->text(),
404 'cssclass' =>
'mw-htmlform-checkradio-indent mw-block-partial-restriction',
407 'autocomplete' => false
409 'section' =>
'actions',
413 $blockActions = $this->blockActionInfo->getAllBlockActions();
414 $optionMessages = array_combine(
415 array_map(
static function ( $action ) {
416 return "ipb-action-$action";
417 }, array_keys( $blockActions ) ),
421 $this->codexFormData[
'partialBlockActionOptions'] = $optionMessages;
423 $a[
'ActionRestrictions'] = [
424 'type' =>
'multiselect',
425 'cssclass' =>
'mw-htmlform-checkradio-indent mw-block-partial-restriction mw-block-action-restriction',
426 'options-messages' => $optionMessages,
427 'section' =>
'actions',
431 $a[
'CreateAccount'] = [
433 'cssclass' =>
'mw-block-restriction',
434 'label-message' =>
'ipbcreateaccount',
436 'section' =>
'details',
439 if ( $this->blockPermissionCheckerFactory
440 ->newBlockPermissionChecker(
null, $user )
441 ->checkEmailPermissions()
443 $a[
'DisableEmail'] = [
445 'cssclass' =>
'mw-block-restriction',
446 'label-message' =>
'ipbemailban',
447 'section' =>
'details',
450 $this->codexFormData[
'blockAllowsEmailBan'] =
true;
453 if ( $blockAllowsUTEdit ) {
454 $a[
'DisableUTEdit'] = [
456 'cssclass' =>
'mw-block-restriction',
457 'label-message' =>
'ipb-disableusertalk',
459 'section' =>
'details',
462 $this->codexFormData[
'blockAllowsUTEdit'] =
true;
465 $defaultExpiry = $this->
msg(
'ipb-default-expiry' )->inContentLanguage();
466 if ( $this->type === DatabaseBlock::TYPE_RANGE || $this->type === DatabaseBlock::TYPE_IP ) {
467 $defaultExpiryIP = $this->
msg(
'ipb-default-expiry-ip' )->inContentLanguage();
468 if ( !$defaultExpiryIP->isDisabled() ) {
469 $defaultExpiry = $defaultExpiryIP;
476 'options' => $suggestedDurations,
477 'default' => $defaultExpiry->text(),
478 'section' =>
'expiry',
480 $this->codexFormData[
'blockExpiryOptions' ] = $suggestedDurations;
481 $this->codexFormData[
'blockExpiryDefault' ] = $defaultExpiry->text();
484 'type' =>
'selectandother',
488 'maxlength' => CommentStore::COMMENT_CHARACTER_LIMIT,
489 'maxlength-unit' =>
'codepoints',
490 'options-message' =>
'ipbreason-dropdown',
491 'section' =>
'reason',
494 if ( $this->useCodex ) {
495 $blockReasonOptions = Html::listDropdownOptionsCodex(
496 Html::listDropdownOptions( $this->
msg(
'ipbreason-dropdown' )->plain(),
497 [
'other' => $this->
msg(
'htmlform-selectorother-other' )->text() ]
499 $this->codexFormData[
'blockReasonOptions' ] = $blockReasonOptions;
500 $this->codexFormData[
'blockReasonMaxLength' ] = CommentStore::COMMENT_CHARACTER_LIMIT;
506 'ipbenableautoblock',
510 'section' =>
'options',
512 $this->codexFormData[
'blockAutoblockExpiry'] = $this->
getLanguage()
519 'label-message' =>
'ipbhidename',
520 'cssclass' =>
'mw-block-hideuser',
521 'section' =>
'options',
524 $this->codexFormData[
'blockHideUser'] =
true;
528 if ( $user->isRegistered() ) {
531 'label-message' =>
'ipbwatchuser',
532 'section' =>
'options',
538 'label-message' =>
'ipb-hardblock',
540 'section' =>
'options',
545 $a[
'PreviousTarget'] = [
554 'label-message' =>
'ipb-confirm',
555 'cssclass' =>
'mw-block-confirm',
561 $this->
getHookRunner()->onSpecialBlockModifyFormFields( $this, $a );
573 $fields[
'Target'][
'default'] = (string)$this->target;
575 if ( $this->target ) {
576 $status = $this->blockUtils->validateTarget( $this->target );
577 if ( !$status->isOK() ) {
578 $errors = $status->getMessages(
'error' );
579 $this->preErrors = array_merge( $this->preErrors, $errors );
584 $fields[
'PreviousTarget'][
'default'] = (string)$this->target;
586 $block = $this->blockStore->newFromTarget( $this->target );
591 && ( $this->type != DatabaseBlock::TYPE_RANGE
592 || ( $this->target && $block->isBlocking( $this->target ) ) )
594 $fields[
'HardBlock'][
'default'] = $block->isHardblock();
595 $fields[
'CreateAccount'][
'default'] = $block->isCreateAccountBlocked();
596 $fields[
'AutoBlock'][
'default'] = $block->isAutoblocking();
598 if ( isset( $fields[
'DisableEmail'] ) ) {
599 $fields[
'DisableEmail'][
'default'] = $block->isEmailBlocked();
602 if ( isset( $fields[
'HideUser'] ) ) {
603 $fields[
'HideUser'][
'default'] = $block->getHideName();
606 if ( isset( $fields[
'DisableUTEdit'] ) ) {
607 $fields[
'DisableUTEdit'][
'default'] = !$block->isUsertalkEditAllowed();
612 if ( !$block->getHideName() || $this->
getAuthority()->isAllowed(
'hideuser' ) ) {
613 $fields[
'Reason'][
'default'] = $block->getReasonComment()->text;
615 $fields[
'Reason'][
'default'] =
'';
621 $fields[
'Confirm'][
'type'] =
'check';
626 $fields[
'Confirm'][
'default'] = 1;
629 if ( $block->getExpiry() ==
'infinity' ) {
630 $fields[
'Expiry'][
'default'] = $this->codexFormData[
'blockExpiryDefault' ] =
'infinite';
632 $fields[
'Expiry'][
'default'] =
wfTimestamp( TS_RFC2822, $block->getExpiry() );
635 if ( !isset( $this->codexFormData[
'blockExpiryPreset' ] ) ) {
636 $this->codexFormData[
'blockExpiryPreset' ] = $this->formatExpiryForHtml( $block->getExpiry() );
640 if ( !$block->isSitewide() ) {
641 $fields[
'EditingRestriction'][
'default'] =
642 $this->codexFormData[
'blockTypePreset' ] =
'partial';
644 $pageRestrictions = [];
645 $namespaceRestrictions = [];
646 foreach ( $block->getRestrictions() as $restriction ) {
648 $pageRestrictions[] = $restriction->getTitle()->getPrefixedText();
650 $this->namespaceInfo->exists( $restriction->getValue() )
652 $namespaceRestrictions[] = $restriction->getValue();
657 sort( $pageRestrictions );
658 $fields[
'PageRestrictions'][
'default'] =
659 $this->codexFormData[
'blockPageRestrictions' ] = implode(
"\n", $pageRestrictions );
660 sort( $namespaceRestrictions );
661 $fields[
'NamespaceRestrictions'][
'default'] =
662 $this->codexFormData[
'blockNamespaceRestrictions' ] = implode(
"\n", $namespaceRestrictions );
665 $actionRestrictions = [];
666 foreach ( $block->getRestrictions() as $restriction ) {
668 $actionRestrictions[] = $restriction->getValue();
671 $fields[
'ActionRestrictions'][
'default'] = $actionRestrictions;
675 $this->alreadyBlocked =
true;
677 $this->preErrors[] = $this->
msg(
'ipb-needreblock',
wfEscapeWikiText( $block->getTargetName() ) );
680 if ( $this->alreadyBlocked || $this->
getRequest()->wasPosted()
681 || $this->
getRequest()->getCheck(
'wpCreateAccount' )
683 $this->
getOutput()->addJsConfigVars(
'wgCreateAccountDirty',
true );
687 if ( $this->requestedHideUser ) {
688 $fields[
'Confirm'][
'type'] =
'check';
689 unset( $fields[
'Confirm'][
'default'] );
690 $this->preErrors[] = $this->
msg(
'ipb-confirmhideuser',
'ipb-confirmaction' );
695 $fields[
'Confirm'][
'type'] =
'check';
696 unset( $fields[
'Confirm'][
'default'] );
697 $this->preErrors[] = $this->
msg(
'ipb-blockingself',
'ipb-confirmaction' );
707 private function formatExpiryForHtml(
string $expiry ): string {
708 if ( preg_match(
'/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/', $expiry ) === 1 ) {
710 return substr( $expiry, 0, 16 );
711 } elseif ( $expiry ===
'' ) {
715 return substr(
wfTimestamp( TS_ISO_8601, $expiry ), 0, 16 );
723 $this->getOutput()->addModuleStyles( [
'mediawiki.special' ] );
724 if ( $this->useCodex ) {
725 $this->getOutput()->addModules( [
'mediawiki.special.block.codex' ] );
727 $this->getOutput()->addModules( [
'mediawiki.special.block' ] );
731 $text = $this->msg(
'blockiptext', $blockCIDRLimit[
'IPv4'], $blockCIDRLimit[
'IPv6'] )->parse();
733 $otherBlockMessages = [];
734 if ( $this->target !==
null ) {
735 $targetName = $this->target;
737 $targetName = $this->target->getName();
740 $this->getHookRunner()->onOtherBlockLogLink(
741 $otherBlockMessages, $targetName );
743 if ( count( $otherBlockMessages ) ) {
744 $s = Html::rawElement(
747 $this->msg(
'ipb-otherblocks-header', count( $otherBlockMessages ) )->parse()
752 foreach ( $otherBlockMessages as $link ) {
753 $list .= Html::rawElement(
'li', [], $link ) .
"\n";
756 $s .= Html::rawElement(
758 [
'class' =>
'mw-blockip-alreadyblocked' ],
776 $this->getOutput()->addModuleStyles(
'mediawiki.special' );
778 $linkRenderer = $this->getLinkRenderer();
782 $links[] = $linkRenderer->makeLink(
784 $this->msg(
'ipb-blocklist-contribs', $this->target->getName() )->text()
790 $message = $this->msg(
796 $message = $this->msg(
'ipb-unblock' )->parse();
799 $links[] = $linkRenderer->makeKnownLink(
805 $links[] = $linkRenderer->makeKnownLink(
807 $this->msg(
'ipb-blocklist' )->text()
811 if ( $this->getAuthority()->isAllowed(
'editinterface' ) ) {
812 $links[] = $linkRenderer->makeKnownLink(
813 $this->msg(
'ipbreason-dropdown' )->inContentLanguage()->
getTitle(),
814 $this->msg(
'ipb-edit-dropdown' )->text(),
816 [
'action' =>
'edit' ]
820 $text = Html::rawElement(
822 [
'class' =>
'mw-ipb-conveniencelinks' ],
823 $this->getLanguage()->pipeList( $links )
826 $userPage = self::getTargetUserTitle( $this->target );
831 LogEventsList::showLogExtract(
840 $this->titleFormatter->getText( $userPage ),
842 'showIfEmpty' =>
false
848 if ( $this->getAuthority()->isAllowed(
'suppressionlog' ) ) {
849 LogEventsList::showLogExtract(
856 'conds' => [
'log_action' => [
'block',
'reblock',
'unblock' ] ],
858 'blocklog-showsuppresslog',
859 $this->titleFormatter->getText( $userPage ),
861 'showIfEmpty' =>
false
880 return PageReferenceValue::localReference(
NS_USER, $target->getName() );
883 if ( is_string( $target ) && IPUtils::isIPAddress( $target ) ) {
884 return PageReferenceValue::localReference(
NS_USER, $target );
901 private function getTargetAndTypeInternal( ?
string $par, WebRequest $request ) {
903 $request->getVal(
'wpTarget',
null ),
905 $request->getVal(
'ip',
null ),
907 $request->getVal(
'wpBlockAddress',
null ),
909 foreach ( $possibleTargets as $possibleTarget ) {
910 $targetAndType = $this->blockUtils
911 ->parseBlockTarget( $possibleTarget );
913 if ( $targetAndType[ 1 ] !==
null ) {
917 return $targetAndType;
931 $services = MediaWikiServices::getInstance();
932 return self::processFormInternal(
935 $services->getBlockUserFactory(),
936 $services->getBlockUtils()
950 private static function processFormInternal(
957 $enablePartialActionBlocks = MediaWikiServices::getInstance()
958 ->getMainConfig()->get( MainConfigNames::EnablePartialActionBlocks );
960 $isPartialBlock = isset( $data[
'EditingRestriction'] ) &&
961 $data[
'EditingRestriction'] ===
'partial';
965 $data[
'Confirm'] = !in_array( $data[
'Confirm'], [
'',
'0',
null,
false ],
true );
969 if ( !isset( $data[
'HideUser'] ) ) {
970 $data[
'HideUser'] =
false;
975 if ( $type == DatabaseBlock::TYPE_USER ) {
976 $target = $target->getName();
985 if ( $target === $performer->
getUser()->getName() &&
986 ( $data[
'PreviousTarget'] !== $target || !$data[
'Confirm'] )
988 return [
'ipb-blockingself',
'ipb-confirmaction' ];
991 if ( $data[
'HideUser'] && !$data[
'Confirm'] ) {
992 return [
'ipb-confirmhideuser',
'ipb-confirmaction' ];
994 } elseif ( $type == DatabaseBlock::TYPE_IP ) {
995 $target = $target->getName();
996 } elseif ( $type != DatabaseBlock::TYPE_RANGE ) {
998 return [
'badipaddress' ];
1003 $blockReason = $data[
'Reason'][0] ??
'';
1005 $pageRestrictions = [];
1006 $namespaceRestrictions = [];
1007 $actionRestrictions = [];
1008 if ( $isPartialBlock ) {
1009 if ( isset( $data[
'PageRestrictions'] ) && $data[
'PageRestrictions'] !==
'' ) {
1010 $titles = explode(
"\n", $data[
'PageRestrictions'] );
1011 foreach ( $titles as $title ) {
1012 $pageRestrictions[] = PageRestriction::newFromTitle( $title );
1015 if ( isset( $data[
'NamespaceRestrictions'] ) && $data[
'NamespaceRestrictions'] !==
'' ) {
1016 $namespaceRestrictions = array_map(
static function ( $id ) {
1017 return new NamespaceRestriction( 0, (
int)$id );
1018 }, explode(
"\n", $data[
'NamespaceRestrictions'] ) );
1021 $enablePartialActionBlocks &&
1022 isset( $data[
'ActionRestrictions'] ) &&
1023 $data[
'ActionRestrictions'] !==
''
1025 $actionRestrictions = array_map(
static function ( $id ) {
1026 return new ActionRestriction( 0, $id );
1027 }, $data[
'ActionRestrictions'] );
1030 $restrictions = array_merge( $pageRestrictions, $namespaceRestrictions, $actionRestrictions );
1032 if ( !isset( $data[
'Tags'] ) ) {
1037 'isCreateAccountBlocked' => $data[
'CreateAccount'],
1038 'isHardBlock' => $data[
'HardBlock'],
1039 'isAutoblocking' => $data[
'AutoBlock'],
1040 'isHideUser' => $data[
'HideUser'],
1041 'isPartial' => $isPartialBlock,
1044 if ( isset( $data[
'DisableUTEdit'] ) ) {
1045 $blockOptions[
'isUserTalkEditBlocked'] = $data[
'DisableUTEdit'];
1047 if ( isset( $data[
'DisableEmail'] ) ) {
1048 $blockOptions[
'isEmailBlocked'] = $data[
'DisableEmail'];
1063 $blockNotConfirmed = !$data[
'Confirm'] || ( array_key_exists(
'PreviousTarget', $data )
1064 && $data[
'PreviousTarget'] !== $target );
1067 $reblockNotAllowed = ( array_key_exists(
'Reblock', $data ) && !$data[
'Reblock'] );
1069 $doReblock = !$blockNotConfirmed && !$reblockNotAllowed;
1071 $status = $blockUser->placeBlock( $doReblock );
1072 if ( !$status->isOK() ) {
1078 $type != DatabaseBlock::TYPE_RANGE
1083 && array_key_exists(
'Watch', $data )
1086 MediaWikiServices::getInstance()->getWatchlistManager()->addWatchIgnoringRights(
1088 Title::makeTitle(
NS_USER, $target )
1109 $lang ??= MediaWikiServices::getInstance()->getContentLanguage();
1110 return $lang->getBlockDurations( $includeOther );
1125 return BlockUser::parseExpiryInput( $expiry );
1138 return MediaWikiServices::getInstance()
1139 ->getBlockPermissionCheckerFactory()
1140 ->newBlockPermissionChecker(
null, User::newFromIdentity( $user ) )
1141 ->checkEmailPermissions();
1151 return self::processFormInternal(
1153 $this->getAuthority(),
1154 $this->blockUserFactory,
1164 $out = $this->getOutput();
1165 $out->setPageTitleMsg( $this->msg(
'blockipsuccesssub' ) );
1166 $out->addWikiMsg(
'blockipsuccesstext',
wfEscapeWikiText( $this->target ) );
1178 $search = $this->userNameUtils->getCanonical( $search );
1184 return $this->userNamePrefixSearch
1185 ->search( UserNamePrefixSearch::AUDIENCE_PUBLIC, $search, $limit, $offset );
1194class_alias( SpecialBlock::class,
'SpecialBlock' );
wfEscapeWikiText( $input)
Escapes the given text so that it may be output using addWikiText() without any linking,...
wfIsInfinity( $str)
Determine input string is represents as infinity.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
if(!defined('MW_SETUP_CALLBACK'))
An error page which can definitely be safely rendered using the OutputPage.
Marks HTML that shouldn't be escaped.
A class containing constants representing the names of configuration variables.
const UseCodexSpecialBlock
Name constant for the UseCodexSpecialBlock setting, for use with Config::get()
const AutoblockExpiry
Name constant for the AutoblockExpiry setting, for use with Config::get()
const EnableMultiBlocks
Name constant for the EnableMultiBlocks setting, for use with Config::get()
const BlockAllowsUTEdit
Name constant for the BlockAllowsUTEdit setting, for use with Config::get()
const BlockCIDRLimit
Name constant for the BlockCIDRLimit setting, for use with Config::get()
const EnablePartialActionBlocks
Name constant for the EnablePartialActionBlocks setting, for use with Config::get()
Special page which uses an HTMLForm to handle processing.
string null $par
The subpage of the special page.
Parent class for all special pages.
getSkin()
Shortcut to get the skin being used for 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,...
getUser()
Shortcut to get the User executing this instance.
getConfig()
Shortcut to get main config object.
getRequest()
Get the WebRequest being used for this instance.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
getAuthority()
Shortcut to get the Authority executing this instance.
getLanguage()
Shortcut to get user's language.
getName()
Get the canonical, unlocalized name of this special page without namespace.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
Interface for objects which can provide a MediaWiki context on request.