89 protected $preErrors = [];
114 parent::__construct(
'Block',
'block' );
116 $this->blockUtils = $blockUtils;
117 $this->blockPermissionCheckerFactory = $blockPermissionCheckerFactory;
118 $this->blockUserFactory = $blockUserFactory;
119 $this->userNameUtils = $userNameUtils;
120 $this->userNamePrefixSearch = $userNamePrefixSearch;
121 $this->blockActionInfo = $blockActionInfo;
122 $this->titleFormatter = $titleFormatter;
123 $this->namespaceInfo = $namespaceInfo;
137 parent::checkExecutePermissions( $user );
138 # T17810: blocked admins should have limited access here
139 $status = $this->blockPermissionCheckerFactory
140 ->newBlockPermissionChecker( $this->target, $user )
141 ->checkBlockPermissions();
142 if ( $status !==
true ) {
162 # Extract variables from the request. Try not to get into a situation where we
163 # need to extract *every* variable from the form just for processing here, but
164 # there are legitimate uses for some variables
166 list( $this->target, $this->type ) = self::getTargetAndType(
$par, $request );
168 # Set the 'relevant user' in the skin, so it displays links like Contributions,
169 # User logs, UserRights, etc.
170 $this->
getSkin()->setRelevantUser( $this->target );
173 list( $this->previousTarget, ) = $this->blockUtils
174 ->parseBlockTarget( $request->getVal(
'wpPreviousTarget' ) );
175 $this->requestedHideUser = $request->getBool(
'wpHideUser' );
187 $msg = $this->alreadyBlocked ?
'ipb-change-block' :
'ipbsubmit';
192 # Don't need to do anything if the form has been posted
193 if ( !$this->
getRequest()->wasPosted() && $this->preErrors ) {
198 [
'class' =>
'error' ],
215 $blockAllowsUTEdit = $conf->get(
'BlockAllowsUTEdit' );
217 'wgEnablePartialActionBlocks',
218 $conf->get(
'EnablePartialActionBlocks' )
225 $suggestedDurations = self::getSuggestedDurations();
233 'id' =>
'mw-bi-target',
237 'placeholder' => $this->
msg(
'block-target-placeholder' )->text(),
238 'validation-callback' =>
function ( $value, $alldata, $form ) {
239 $status = $this->blockUtils->validateTarget( $value );
240 if ( !$status->isOK() ) {
241 $errors = $status->getErrorsArray();
243 return $form->msg( ...$errors[0] );
247 'section' =>
'target',
252 'label-message' =>
'block-prevent-edit',
254 'section' =>
'actions',
257 $a[
'EditingRestriction'] = [
259 'cssclass' =>
'mw-block-editing-restriction',
260 'default' =>
'sitewide',
262 $this->
msg(
'ipb-sitewide' )->escaped() .
263 new \OOUI\LabelWidget( [
264 'classes' => [
'oo-ui-inline-help' ],
265 'label' => $this->
msg(
'ipb-sitewide-help' )->text(),
267 $this->
msg(
'ipb-partial' )->escaped() .
268 new \OOUI\LabelWidget( [
269 'classes' => [
'oo-ui-inline-help' ],
270 'label' => $this->
msg(
'ipb-partial-help' )->text(),
273 'section' =>
'actions',
276 $a[
'PageRestrictions'] = [
277 'type' =>
'titlesmultiselect',
278 'label' => $this->
msg(
'ipb-pages-label' )->text(),
281 'cssclass' =>
'mw-block-restriction',
283 'showMissing' =>
false,
284 'excludeDynamicNamespaces' =>
true,
286 'autocomplete' => false
288 'section' =>
'actions',
291 $a[
'NamespaceRestrictions'] = [
292 'type' =>
'namespacesmultiselect',
293 'label' => $this->
msg(
'ipb-namespaces-label' )->text(),
295 'cssclass' =>
'mw-block-restriction',
298 'autocomplete' => false
300 'section' =>
'actions',
303 $a[
'CreateAccount'] = [
305 'label-message' =>
'ipbcreateaccount',
307 'section' =>
'actions',
310 if ( $this->blockPermissionCheckerFactory
311 ->newBlockPermissionChecker(
null, $user )
312 ->checkEmailPermissions()
314 $a[
'DisableEmail'] = [
316 'label-message' =>
'ipbemailban',
317 'section' =>
'actions',
321 if ( $blockAllowsUTEdit ) {
322 $a[
'DisableUTEdit'] = [
324 'label-message' =>
'ipb-disableusertalk',
326 'section' =>
'actions',
330 if ( $conf->get(
'EnablePartialActionBlocks' ) ) {
331 $blockActions = $this->blockActionInfo->getAllBlockActions();
332 $a[
'ActionRestrictions'] = [
333 'type' =>
'multiselect',
334 'cssclass' =>
'mw-block-action-restriction',
335 'options-messages' => array_combine(
336 array_map(
static function ( $action ) {
337 return "ipb-action-$action";
338 }, array_keys( $blockActions ) ),
341 'section' =>
'actions',
345 $defaultExpiry = $this->
msg(
'ipb-default-expiry' )->inContentLanguage();
346 if ( $this->type === DatabaseBlock::TYPE_RANGE || $this->type === DatabaseBlock::TYPE_IP ) {
347 $defaultExpiryIP = $this->
msg(
'ipb-default-expiry-ip' )->inContentLanguage();
348 if ( !$defaultExpiryIP->isDisabled() ) {
349 $defaultExpiry = $defaultExpiryIP;
356 'options' => $suggestedDurations,
357 'default' => $defaultExpiry->text(),
358 'section' =>
'expiry',
362 'type' =>
'selectandother',
366 'maxlength' => CommentStore::COMMENT_CHARACTER_LIMIT,
367 'maxlength-unit' =>
'codepoints',
368 'options-message' =>
'ipbreason-dropdown',
369 'section' =>
'reason',
374 'label-message' =>
'ipbenableautoblock',
376 'section' =>
'options',
379 # Allow some users to hide name from block log, blocklist and listusers
383 'label-message' =>
'ipbhidename',
384 'cssclass' =>
'mw-block-hideuser',
385 'section' =>
'options',
389 # Watchlist their user page? (Only if user is logged in)
390 if ( $user->isRegistered() ) {
393 'label-message' =>
'ipbwatchuser',
394 'section' =>
'options',
400 'label-message' =>
'ipb-hardblock',
402 'section' =>
'options',
405 # This is basically a copy of the Target field, but the user can't change it, so we
406 # can see if the warnings we maybe showed to the user before still apply
407 $a[
'PreviousTarget'] = [
412 # We'll turn this into a checkbox if we need to
416 'label-message' =>
'ipb-confirm',
417 'cssclass' =>
'mw-block-confirm',
423 $this->
getHookRunner()->onSpecialBlockModifyFormFields( $this, $a );
434 # This will be overwritten by request data
435 $fields[
'Target'][
'default'] = (string)$this->target;
437 if ( $this->target ) {
438 $status = $this->blockUtils->validateTarget( $this->target );
439 if ( !$status->isOK() ) {
440 $errors = $status->getErrorsArray();
441 $this->preErrors = array_merge( $this->preErrors, $errors );
446 $fields[
'PreviousTarget'][
'default'] = (string)$this->target;
448 $block = DatabaseBlock::newFromTarget( $this->target );
453 && ( $this->type != DatabaseBlock::TYPE_RANGE
454 || ( $this->target && $block->isBlocking( $this->target ) ) )
456 $fields[
'HardBlock'][
'default'] = $block->isHardblock();
457 $fields[
'CreateAccount'][
'default'] = $block->isCreateAccountBlocked();
458 $fields[
'AutoBlock'][
'default'] = $block->isAutoblocking();
460 if ( isset( $fields[
'DisableEmail'] ) ) {
461 $fields[
'DisableEmail'][
'default'] = $block->isEmailBlocked();
464 if ( isset( $fields[
'HideUser'] ) ) {
465 $fields[
'HideUser'][
'default'] = $block->getHideName();
468 if ( isset( $fields[
'DisableUTEdit'] ) ) {
469 $fields[
'DisableUTEdit'][
'default'] = !$block->isUsertalkEditAllowed();
474 if ( !$block->getHideName() || $this->getAuthority()->isAllowed(
'hideuser' ) ) {
475 $fields[
'Reason'][
'default'] = $block->getReasonComment()->text;
477 $fields[
'Reason'][
'default'] =
'';
481 # Ok, so we got a POST submission asking us to reblock a user. So show the
482 # confirm checkbox; the user will only see it if they haven't previously
483 $fields[
'Confirm'][
'type'] =
'check';
485 # We got a target, but it wasn't a POST request, so the user must have gone
486 # to a link like [[Special:Block/User]]. We don't need to show the checkbox
487 # as long as they go ahead and block *that* user
488 $fields[
'Confirm'][
'default'] = 1;
491 if ( $block->getExpiry() ==
'infinity' ) {
492 $fields[
'Expiry'][
'default'] =
'infinite';
494 $fields[
'Expiry'][
'default'] =
wfTimestamp( TS_RFC2822, $block->getExpiry() );
497 if ( !$block->isSitewide() ) {
498 $fields[
'EditingRestriction'][
'default'] =
'partial';
500 $pageRestrictions = [];
501 $namespaceRestrictions = [];
502 foreach ( $block->getRestrictions() as $restriction ) {
504 $pageRestrictions[] = $restriction->getTitle()->getPrefixedText();
506 $this->namespaceInfo->exists( $restriction->getValue() )
508 $namespaceRestrictions[] = $restriction->getValue();
513 sort( $pageRestrictions );
514 $fields[
'PageRestrictions'][
'default'] = implode(
"\n", $pageRestrictions );
515 sort( $namespaceRestrictions );
516 $fields[
'NamespaceRestrictions'][
'default'] = implode(
"\n", $namespaceRestrictions );
519 empty( $pageRestrictions ) &&
520 empty( $namespaceRestrictions )
522 $fields[
'Editing'][
'default'] =
false;
525 if ( $this->
getConfig()->
get(
'EnablePartialActionBlocks' ) ) {
526 $actionRestrictions = [];
527 foreach ( $block->getRestrictions() as $restriction ) {
529 $actionRestrictions[] = $restriction->getValue();
532 $fields[
'ActionRestrictions'][
'default'] = $actionRestrictions;
536 $this->alreadyBlocked =
true;
537 $this->preErrors[] = [
'ipb-needreblock',
wfEscapeWikiText( $block->getTargetName() ) ];
540 if ( $this->alreadyBlocked || $this->
getRequest()->wasPosted()
541 || $this->
getRequest()->getCheck(
'wpCreateAccount' )
543 $this->
getOutput()->addJsConfigVars(
'wgCreateAccountDirty',
true );
546 # We always need confirmation to do HideUser
547 if ( $this->requestedHideUser ) {
548 $fields[
'Confirm'][
'type'] =
'check';
549 unset( $fields[
'Confirm'][
'default'] );
550 $this->preErrors[] = [
'ipb-confirmhideuser',
'ipb-confirmaction' ];
553 # Or if the user is trying to block themselves
555 $fields[
'Confirm'][
'type'] =
'check';
556 unset( $fields[
'Confirm'][
'default'] );
557 $this->preErrors[] = [
'ipb-blockingself',
'ipb-confirmaction' ];
567 'mediawiki.widgets.TagMultiselectWidget.styles',
570 $this->
getOutput()->addModules( [
'mediawiki.special.block' ] );
572 $blockCIDRLimit = $this->
getConfig()->get(
'BlockCIDRLimit' );
573 $text = $this->
msg(
'blockiptext', $blockCIDRLimit[
'IPv4'], $blockCIDRLimit[
'IPv6'] )->parse();
575 $otherBlockMessages = [];
576 if ( $this->target !==
null ) {
577 $targetName = $this->target;
579 $targetName = $this->target->getName();
581 # Get other blocks, i.e. from GlobalBlocking or TorBlock extension
583 $otherBlockMessages, $targetName );
585 if ( count( $otherBlockMessages ) ) {
586 $s = Html::rawElement(
589 $this->
msg(
'ipb-otherblocks-header', count( $otherBlockMessages ) )->parse()
594 foreach ( $otherBlockMessages as $link ) {
595 $list .= Html::rawElement(
'li', [], $link ) .
"\n";
598 $s .= Html::rawElement(
600 [
'class' =>
'mw-blockip-alreadyblocked' ],
618 $this->
getOutput()->addModuleStyles(
'mediawiki.special' );
621 # Link to the user's contributions, if applicable
626 $this->
msg(
'ipb-blocklist-contribs', $this->target->getName() )->text()
630 # Link to unblock the specified user, or to a blank unblock form
632 $message = $this->
msg(
638 $message = $this->
msg(
'ipb-unblock' )->parse();
646 # Link to the block list
649 $this->
msg(
'ipb-blocklist' )->text()
652 # Link to edit the block dropdown reasons, if applicable
653 if ( $this->
getAuthority()->isAllowed(
'editinterface' ) ) {
655 $this->
msg(
'ipbreason-dropdown' )->inContentLanguage()->
getTitle(),
656 $this->
msg(
'ipb-edit-dropdown' )->text(),
658 [
'action' =>
'edit' ]
662 $text = Html::rawElement(
664 [
'class' =>
'mw-ipb-conveniencelinks' ],
668 $userPage = self::getTargetUserTitle( $this->target );
670 # Get relevant extracts from the block and suppression logs, if possible
673 LogEventsList::showLogExtract(
682 $this->titleFormatter->getText( $userPage ),
684 'showIfEmpty' =>
false
689 # Add suppression block entries if allowed
690 if ( $this->
getAuthority()->isAllowed(
'suppressionlog' ) ) {
691 LogEventsList::showLogExtract(
698 'conds' => [
'log_action' => [
'block',
'reblock',
'unblock' ] ],
700 'blocklog-showsuppresslog',
701 $this->titleFormatter->getText( $userPage ),
703 'showIfEmpty' =>
false
725 if ( is_string( $target ) && IPUtils::isIPAddress( $target ) ) {
726 return PageReferenceValue::localReference(
NS_USER, $target );
747 return MediaWikiServices::getInstance()->getBlockUtils()->parseBlockTarget( $par );
751 $request->getVal(
'wpTarget',
null ),
753 $request->getVal(
'ip',
null ),
755 $request->getVal(
'wpBlockAddress',
null ),
757 foreach ( $possibleTargets as $possibleTarget ) {
758 $targetAndType = MediaWikiServices::getInstance()
760 ->parseBlockTarget( $possibleTarget );
762 if ( $targetAndType[ 1 ] !==
null ) {
766 return $targetAndType;
778 $services = MediaWikiServices::getInstance();
779 return self::processFormInternal(
782 $services->getBlockUserFactory(),
783 $services->getBlockUtils()
804 $enablePartialActionBlocks = MediaWikiServices::getInstance()
805 ->getMainConfig()->get(
'EnablePartialActionBlocks' );
807 $isPartialBlock = isset( $data[
'EditingRestriction'] ) &&
808 $data[
'EditingRestriction'] ===
'partial';
810 # This might have been a hidden field or a checkbox, so interesting data
812 $data[
'Confirm'] = !in_array( $data[
'Confirm'], [
'',
'0',
null,
false ],
true );
814 # If the user has done the form 'properly', they won't even have been given the
815 # option to suppress-block unless they have the 'hideuser' permission
816 if ( !isset( $data[
'HideUser'] ) ) {
817 $data[
'HideUser'] =
false;
822 if (
$type == DatabaseBlock::TYPE_USER ) {
824 $target = $user->getName();
825 $userId = $user->getId();
827 # Give admins a heads-up before they go and block themselves. Much messier
828 # to do this for IPs, but it's pretty unlikely they'd ever get the 'block'
829 # permission anyway, although the code does allow for it.
830 # Note: Important to use $target instead of $data['Target']
831 # since both $data['PreviousTarget'] and $target are normalized
832 # but $data['target'] gets overridden by (non-normalized) request variable
833 # from previous request.
834 if ( $target === $performer->
getUser()->getName() &&
835 ( $data[
'PreviousTarget'] !== $target || !$data[
'Confirm'] )
837 return [
'ipb-blockingself',
'ipb-confirmaction' ];
840 if ( $data[
'HideUser'] && !$data[
'Confirm'] ) {
841 return [
'ipb-confirmhideuser',
'ipb-confirmaction' ];
843 } elseif (
$type == DatabaseBlock::TYPE_RANGE ) {
846 } elseif (
$type == DatabaseBlock::TYPE_IP ) {
848 $target = $target->getName();
851 # This should have been caught in the form field validation
852 return [
'badipaddress' ];
857 $blockReason = $data[
'Reason'][0] ??
'';
859 $pageRestrictions = [];
860 $namespaceRestrictions = [];
861 $actionRestrictions = [];
862 if ( $isPartialBlock ) {
863 if ( isset( $data[
'PageRestrictions'] ) && $data[
'PageRestrictions'] !==
'' ) {
864 $titles = explode(
"\n", $data[
'PageRestrictions'] );
865 foreach ( $titles as
$title ) {
866 $pageRestrictions[] = PageRestriction::newFromTitle(
$title );
869 if ( isset( $data[
'NamespaceRestrictions'] ) && $data[
'NamespaceRestrictions'] !==
'' ) {
870 $namespaceRestrictions = array_map(
static function ( $id ) {
872 }, explode(
"\n", $data[
'NamespaceRestrictions'] ) );
875 $enablePartialActionBlocks &&
876 isset( $data[
'ActionRestrictions'] ) &&
877 $data[
'ActionRestrictions'] !==
''
879 $actionRestrictions = array_map(
static function ( $id ) {
881 }, $data[
'ActionRestrictions'] );
884 $restrictions = array_merge( $pageRestrictions, $namespaceRestrictions, $actionRestrictions );
886 if ( !isset( $data[
'Tags'] ) ) {
891 'isCreateAccountBlocked' => $data[
'CreateAccount'],
892 'isHardBlock' => $data[
'HardBlock'],
893 'isAutoblocking' => $data[
'AutoBlock'],
894 'isHideUser' => $data[
'HideUser'],
895 'isPartial' => $isPartialBlock,
898 if ( isset( $data[
'DisableUTEdit'] ) ) {
899 $blockOptions[
'isUserTalkEditBlocked'] = $data[
'DisableUTEdit'];
901 if ( isset( $data[
'DisableEmail'] ) ) {
902 $blockOptions[
'isEmailBlocked'] = $data[
'DisableEmail'];
915 # Indicates whether the user is confirming the block and is aware of
916 # the conflict (did not change the block target in the meantime)
917 $blockNotConfirmed = !$data[
'Confirm'] || ( array_key_exists(
'PreviousTarget', $data )
918 && $data[
'PreviousTarget'] !== $target );
920 # Special case for API - T34434
921 $reblockNotAllowed = ( array_key_exists(
'Reblock', $data ) && !$data[
'Reblock'] );
923 $doReblock = !$blockNotConfirmed && !$reblockNotAllowed;
925 $status = $blockUser->placeBlock( $doReblock );
926 if ( !$status->isOK() ) {
932 $type != DatabaseBlock::TYPE_RANGE
937 && array_key_exists(
'Watch', $data )
940 MediaWikiServices::getInstance()->getWatchlistManager()->addWatchIgnoringRights(
942 Title::makeTitle(
NS_USER, $target )
960 $msg =
$lang ===
null
961 ?
wfMessage(
'ipboptions' )->inContentLanguage()->text()
970 if ( $a && $includeOther ) {
973 $a[
wfMessage(
'ipbother' )->text() ] =
'other';
989 return BlockUser::parseExpiryInput( $expiry );
1000 return MediaWikiServices::getInstance()
1001 ->getBlockPermissionCheckerFactory()
1003 ->checkEmailPermissions();
1022 return MediaWikiServices::getInstance()
1023 ->getBlockPermissionCheckerFactory()
1024 ->newBlockPermissionChecker( $target, $performer )
1025 ->checkBlockPermissions();
1037 if ( isset( $data[
'Editing'] ) && $data[
'Editing'] ===
false ) {
1038 $data[
'EditingRestriction'] =
'partial';
1039 $data[
'PageRestrictions'] =
'';
1040 $data[
'NamespaceRestrictions'] =
'';
1042 return self::processFormInternal(
1045 $this->blockUserFactory,
1055 $out = $this->getOutput();
1056 $out->setPageTitle( $this->msg(
'blockipsuccesssub' ) );
1057 $out->addWikiMsg(
'blockipsuccesstext',
wfEscapeWikiText( $this->target ) );
1069 $search = $this->userNameUtils->getCanonical( $search );
1075 return $this->userNamePrefixSearch
1076 ->search( UserNamePrefixSearch::AUDIENCE_PUBLIC, $search, $limit, $offset );
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
wfEscapeWikiText( $text)
Escapes the given text so that it may be output using addWikiText() without any linking,...
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
if(ini_get('mbstring.func_overload')) if(!defined('MW_ENTRY_POINT'))
Pre-config setup: Before loading LocalSettings.php.
An error page which can definitely be safely rendered using the OutputPage.
Special page which uses an HTMLForm to handle processing.
string null $par
The sub-page of the special page.
Marks HTML that shouldn't be escaped.
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
A special page that allows users with 'block' right to block users from editing pages and other actio...
int $type
DatabaseBlock::TYPE_ constant.
requiresUnblock()
We allow certain special cases where user is blocked.
NamespaceInfo $namespaceInfo
BlockPermissionCheckerFactory $blockPermissionCheckerFactory
preText()
Add header elements like block log entries, etc.
static processForm(array $data, IContextSource $context)
Given the form data, actually implement a block.
UserNameUtils $userNameUtils
BlockActionInfo $blockActionInfo
onSuccess()
Do something exciting on successful processing of the form, most likely to show a confirmation messag...
static parseExpiryInput( $expiry)
Convert a submitted expiry time, which may be relative ("2 weeks", etc) or absolute ("24 May 2034",...
TitleFormatter $titleFormatter
bool $requestedHideUser
Whether the previous submission of the form asked for HideUser.
maybeAlterFormDefaults(&$fields)
If the user has already been blocked with similar settings, load that block and change the defaults f...
getFormFields()
Get the HTMLForm descriptor array for the block form.
postText()
Add footer elements to the form.
BlockUserFactory $blockUserFactory
__construct(BlockUtils $blockUtils, BlockPermissionCheckerFactory $blockPermissionCheckerFactory, BlockUserFactory $blockUserFactory, UserNameUtils $userNameUtils, UserNamePrefixSearch $userNamePrefixSearch, BlockActionInfo $blockActionInfo, TitleFormatter $titleFormatter, NamespaceInfo $namespaceInfo)
static checkUnblockSelf( $target, Authority $performer)
T17810: Sitewide blocked admins should not be able to block/unblock others with one exception; they c...
getDisplayFormat()
Get display format for the form.
UserNamePrefixSearch $userNamePrefixSearch
setParameter( $par)
Handle some magic here.
User string $previousTarget
The previous block target.
checkExecutePermissions(User $user)
Checks that the user can unblock themselves if they are trying to do so.
alterForm(HTMLForm $form)
Customizes the HTMLForm a bit.
static processFormInternal(array $data, Authority $performer, BlockUserFactory $blockUserFactory, BlockUtils $blockUtils)
Implementation details for processForm Own function to allow sharing the deprecated code with non-dep...
static getTargetUserTitle( $target)
Get a user page target for things like logs.
static canBlockEmail(UserIdentity $user)
Can we do an email block?
doesWrites()
Indicates whether this special page may perform database writes.
onSubmit(array $data, HTMLForm $form=null)
Process the form on POST submission.
static getSuggestedDurations(Language $lang=null, $includeOther=true)
Get an array of suggested block durations from MediaWiki:Ipboptions.
prefixSearchSubpages( $search, $limit, $offset)
Return an array of subpages beginning with $search that this special page will accept.
static getTargetAndType(?string $par, WebRequest $request=null)
Get the target and type, given the request and the subpage parameter.
UserIdentity string null $target
User to be blocked, as passed either by parameter (url?wpTarget=Foo) or as subpage (Special:Block/Foo...
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
getName()
Get the name of this Special Page.
getOutput()
Get the OutputPage being used for this instance.
getUser()
Shortcut to get the User executing this instance.
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,...
LinkRenderer null $linkRenderer
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getConfig()
Shortcut to get main config object.
getRequest()
Get the WebRequest being used for this instance.
getLanguage()
Shortcut to get user's language.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
static newFromIdentity(UserIdentity $identity)
Returns a User object corresponding to the given UserIdentity.
The WebRequest class encapsulates getting at data passed in the URL or via a POSTed form stripping il...
static parseOptionsMessage(string $msg)
Parse labels and values out of a comma- and colon-separated list of options, such as is used for expi...
Interface for objects which can provide a MediaWiki context on request.
foreach( $mmfl['setupFiles'] as $fileName) if($queue) if(empty( $mmfl['quiet'])) $s
if(!isset( $args[0])) $lang