58 private $blockPermissionCheckerFactory;
61 private $blockUserFactory;
64 private $userNameUtils;
67 private $userNamePrefixSearch;
70 private $blockActionInfo;
73 private $titleFormatter;
96 protected $preErrors = [];
99 private $namespaceInfo;
121 parent::__construct(
'Block',
'block' );
123 $this->blockUtils = $blockUtils;
124 $this->blockPermissionCheckerFactory = $blockPermissionCheckerFactory;
125 $this->blockUserFactory = $blockUserFactory;
126 $this->userNameUtils = $userNameUtils;
127 $this->userNamePrefixSearch = $userNamePrefixSearch;
128 $this->blockActionInfo = $blockActionInfo;
129 $this->titleFormatter = $titleFormatter;
130 $this->namespaceInfo = $namespaceInfo;
144 parent::checkExecutePermissions( $user );
145 # T17810: blocked admins should have limited access here
146 $status = $this->blockPermissionCheckerFactory
147 ->newBlockPermissionChecker( $this->target, $user )
148 ->checkBlockPermissions();
149 if ( $status !==
true ) {
169 # Extract variables from the request. Try not to get into a situation where we
170 # need to extract *every* variable from the form just for processing here, but
171 # there are legitimate uses for some variables
173 [ $this->target,
$this->type ] = self::getTargetAndType(
$par, $request );
175 # Set the 'relevant user' in the skin, so it displays links like Contributions,
176 # User logs, UserRights, etc.
177 $this->
getSkin()->setRelevantUser( $this->target );
180 [ $this->previousTarget, ] = $this->blockUtils
181 ->parseBlockTarget( $request->getVal(
'wpPreviousTarget' ) );
182 $this->requestedHideUser = $request->getBool(
'wpHideUser' );
194 $msg = $this->alreadyBlocked ?
'ipb-change-block' :
'ipbsubmit';
199 # Don't need to do anything if the form has been posted
200 if ( !$this->
getRequest()->wasPosted() && $this->preErrors ) {
201 # Mimic error messages normally generated by the form
203 new OOUI\Widget( [] ),
206 'errors' => array_map(
function ( $errMsg ) {
208 return new OOUI\HtmlSnippet( $this->
msg( ...$errMsg )->parse() );
209 }, $this->preErrors ),
225 $blockAllowsUTEdit = $conf->get( MainConfigNames::BlockAllowsUTEdit );
231 $suggestedDurations = self::getSuggestedDurations();
239 'id' =>
'mw-bi-target',
243 'placeholder' => $this->
msg(
'block-target-placeholder' )->text(),
244 'validation-callback' =>
function ( $value, $alldata, $form ) {
245 $status = $this->blockUtils->validateTarget( $value );
246 if ( !$status->isOK() ) {
247 $errors = $status->getErrorsArray();
249 return $form->msg( ...$errors[0] );
253 'section' =>
'target',
256 $a[
'EditingRestriction'] = [
258 'cssclass' =>
'mw-block-editing-restriction',
259 'default' =>
'sitewide',
261 $this->
msg(
'ipb-sitewide' )->escaped() .
262 new \OOUI\LabelWidget( [
263 'classes' => [
'oo-ui-inline-help' ],
264 'label' =>
new \OOUI\HtmlSnippet( $this->
msg(
'ipb-sitewide-help' )->parse() ),
266 $this->
msg(
'ipb-partial' )->escaped() .
267 new \OOUI\LabelWidget( [
268 'classes' => [
'oo-ui-inline-help' ],
269 'label' => $this->
msg(
'ipb-partial-help' )->text(),
272 'section' =>
'actions',
275 $a[
'PageRestrictions'] = [
276 'type' =>
'titlesmultiselect',
277 'label' => $this->
msg(
'ipb-pages-label' )->text(),
280 'cssclass' =>
'mw-htmlform-checkradio-indent mw-block-partial-restriction',
282 'showMissing' =>
false,
283 'excludeDynamicNamespaces' =>
true,
285 'autocomplete' => false
287 'section' =>
'actions',
290 $a[
'NamespaceRestrictions'] = [
291 'type' =>
'namespacesmultiselect',
292 'label' => $this->
msg(
'ipb-namespaces-label' )->text(),
294 'cssclass' =>
'mw-htmlform-checkradio-indent mw-block-partial-restriction',
297 'autocomplete' => false
299 'section' =>
'actions',
302 if ( $conf->get( MainConfigNames::EnablePartialActionBlocks ) ) {
303 $blockActions = $this->blockActionInfo->getAllBlockActions();
304 $a[
'ActionRestrictions'] = [
305 'type' =>
'multiselect',
306 'cssclass' =>
'mw-htmlform-checkradio-indent mw-block-partial-restriction mw-block-action-restriction',
307 'options-messages' => array_combine(
308 array_map(
static function ( $action ) {
309 return "ipb-action-$action";
310 }, array_keys( $blockActions ) ),
313 'section' =>
'actions',
317 $a[
'CreateAccount'] = [
319 'cssclass' =>
'mw-block-restriction',
320 'label-message' =>
'ipbcreateaccount',
322 'section' =>
'details',
325 if ( $this->blockPermissionCheckerFactory
326 ->newBlockPermissionChecker(
null, $user )
327 ->checkEmailPermissions()
329 $a[
'DisableEmail'] = [
331 'cssclass' =>
'mw-block-restriction',
332 'label-message' =>
'ipbemailban',
333 'section' =>
'details',
337 if ( $blockAllowsUTEdit ) {
338 $a[
'DisableUTEdit'] = [
340 'cssclass' =>
'mw-block-restriction',
341 'label-message' =>
'ipb-disableusertalk',
343 'section' =>
'details',
347 $defaultExpiry = $this->
msg(
'ipb-default-expiry' )->inContentLanguage();
348 if ( $this->type === DatabaseBlock::TYPE_RANGE || $this->type === DatabaseBlock::TYPE_IP ) {
349 $defaultExpiryIP = $this->
msg(
'ipb-default-expiry-ip' )->inContentLanguage();
350 if ( !$defaultExpiryIP->isDisabled() ) {
351 $defaultExpiry = $defaultExpiryIP;
358 'options' => $suggestedDurations,
359 'default' => $defaultExpiry->text(),
360 'section' =>
'expiry',
364 'type' =>
'selectandother',
368 'maxlength' => CommentStore::COMMENT_CHARACTER_LIMIT,
369 'maxlength-unit' =>
'codepoints',
370 'options-message' =>
'ipbreason-dropdown',
371 'section' =>
'reason',
377 'ipbenableautoblock',
381 'section' =>
'options',
384 # Allow some users to hide name from block log, blocklist and listusers
388 'label-message' =>
'ipbhidename',
389 'cssclass' =>
'mw-block-hideuser',
390 'section' =>
'options',
394 # Watchlist their user page? (Only if user is logged in)
395 if ( $user->isRegistered() ) {
398 'label-message' =>
'ipbwatchuser',
399 'section' =>
'options',
405 'label-message' =>
'ipb-hardblock',
407 'section' =>
'options',
410 # This is basically a copy of the Target field, but the user can't change it, so we
411 # can see if the warnings we maybe showed to the user before still apply
412 $a[
'PreviousTarget'] = [
417 # We'll turn this into a checkbox if we need to
421 'label-message' =>
'ipb-confirm',
422 'cssclass' =>
'mw-block-confirm',
428 $this->
getHookRunner()->onSpecialBlockModifyFormFields( $this, $a );
439 # This will be overwritten by request data
440 $fields[
'Target'][
'default'] = (string)$this->target;
442 if ( $this->target ) {
443 $status = $this->blockUtils->validateTarget( $this->target );
444 if ( !$status->isOK() ) {
445 $errors = $status->getErrorsArray();
446 $this->preErrors = array_merge( $this->preErrors, $errors );
451 $fields[
'PreviousTarget'][
'default'] = (string)$this->target;
453 $block = DatabaseBlock::newFromTarget( $this->target );
458 && ( $this->type != DatabaseBlock::TYPE_RANGE
459 || ( $this->target && $block->isBlocking( $this->target ) ) )
461 $fields[
'HardBlock'][
'default'] = $block->isHardblock();
462 $fields[
'CreateAccount'][
'default'] = $block->isCreateAccountBlocked();
463 $fields[
'AutoBlock'][
'default'] = $block->isAutoblocking();
465 if ( isset( $fields[
'DisableEmail'] ) ) {
466 $fields[
'DisableEmail'][
'default'] = $block->isEmailBlocked();
469 if ( isset( $fields[
'HideUser'] ) ) {
470 $fields[
'HideUser'][
'default'] = $block->getHideName();
473 if ( isset( $fields[
'DisableUTEdit'] ) ) {
474 $fields[
'DisableUTEdit'][
'default'] = !$block->isUsertalkEditAllowed();
479 if ( !$block->getHideName() || $this->getAuthority()->isAllowed(
'hideuser' ) ) {
480 $fields[
'Reason'][
'default'] = $block->getReasonComment()->text;
482 $fields[
'Reason'][
'default'] =
'';
486 # Ok, so we got a POST submission asking us to reblock a user. So show the
487 # confirm checkbox; the user will only see it if they haven't previously
488 $fields[
'Confirm'][
'type'] =
'check';
490 # We got a target, but it wasn't a POST request, so the user must have gone
491 # to a link like [[Special:Block/User]]. We don't need to show the checkbox
492 # as long as they go ahead and block *that* user
493 $fields[
'Confirm'][
'default'] = 1;
496 if ( $block->getExpiry() ==
'infinity' ) {
497 $fields[
'Expiry'][
'default'] =
'infinite';
499 $fields[
'Expiry'][
'default'] =
wfTimestamp( TS_RFC2822, $block->getExpiry() );
502 if ( !$block->isSitewide() ) {
503 $fields[
'EditingRestriction'][
'default'] =
'partial';
505 $pageRestrictions = [];
506 $namespaceRestrictions = [];
507 foreach ( $block->getRestrictions() as $restriction ) {
509 $pageRestrictions[] = $restriction->getTitle()->getPrefixedText();
511 $this->namespaceInfo->exists( $restriction->getValue() )
513 $namespaceRestrictions[] = $restriction->getValue();
518 sort( $pageRestrictions );
519 $fields[
'PageRestrictions'][
'default'] = implode(
"\n", $pageRestrictions );
520 sort( $namespaceRestrictions );
521 $fields[
'NamespaceRestrictions'][
'default'] = implode(
"\n", $namespaceRestrictions );
523 if ( $this->
getConfig()->
get( MainConfigNames::EnablePartialActionBlocks ) ) {
524 $actionRestrictions = [];
525 foreach ( $block->getRestrictions() as $restriction ) {
527 $actionRestrictions[] = $restriction->getValue();
530 $fields[
'ActionRestrictions'][
'default'] = $actionRestrictions;
534 $this->alreadyBlocked =
true;
535 $this->preErrors[] = [
'ipb-needreblock',
wfEscapeWikiText( $block->getTargetName() ) ];
538 if ( $this->alreadyBlocked || $this->
getRequest()->wasPosted()
539 || $this->
getRequest()->getCheck(
'wpCreateAccount' )
541 $this->
getOutput()->addJsConfigVars(
'wgCreateAccountDirty',
true );
544 # We always need confirmation to do HideUser
545 if ( $this->requestedHideUser ) {
546 $fields[
'Confirm'][
'type'] =
'check';
547 unset( $fields[
'Confirm'][
'default'] );
548 $this->preErrors[] = [
'ipb-confirmhideuser',
'ipb-confirmaction' ];
551 # Or if the user is trying to block themselves
553 $fields[
'Confirm'][
'type'] =
'check';
554 unset( $fields[
'Confirm'][
'default'] );
555 $this->preErrors[] = [
'ipb-blockingself',
'ipb-confirmaction' ];
564 $this->
getOutput()->addModuleStyles( [
'mediawiki.special' ] );
565 $this->
getOutput()->addModules( [
'mediawiki.special.block' ] );
567 $blockCIDRLimit = $this->
getConfig()->get( MainConfigNames::BlockCIDRLimit );
568 $text = $this->
msg(
'blockiptext', $blockCIDRLimit[
'IPv4'], $blockCIDRLimit[
'IPv6'] )->parse();
570 $otherBlockMessages = [];
571 if ( $this->target !==
null ) {
572 $targetName = $this->target;
574 $targetName = $this->target->getName();
576 # Get other blocks, i.e. from GlobalBlocking or TorBlock extension
578 $otherBlockMessages, $targetName );
580 if ( count( $otherBlockMessages ) ) {
581 $s = Html::rawElement(
584 $this->
msg(
'ipb-otherblocks-header', count( $otherBlockMessages ) )->parse()
589 foreach ( $otherBlockMessages as $link ) {
590 $list .= Html::rawElement(
'li', [], $link ) .
"\n";
593 $s .= Html::rawElement(
595 [
'class' =>
'mw-blockip-alreadyblocked' ],
613 $this->
getOutput()->addModuleStyles(
'mediawiki.special' );
616 # Link to the user's contributions, if applicable
619 $links[] = $linkRenderer->makeLink(
621 $this->
msg(
'ipb-blocklist-contribs', $this->target->getName() )->text()
625 # Link to unblock the specified user, or to a blank unblock form
627 $message = $this->
msg(
633 $message = $this->
msg(
'ipb-unblock' )->parse();
636 $links[] = $linkRenderer->makeKnownLink(
641 # Link to the block list
642 $links[] = $linkRenderer->makeKnownLink(
644 $this->
msg(
'ipb-blocklist' )->text()
647 # Link to edit the block dropdown reasons, if applicable
648 if ( $this->
getAuthority()->isAllowed(
'editinterface' ) ) {
649 $links[] = $linkRenderer->makeKnownLink(
650 $this->
msg(
'ipbreason-dropdown' )->inContentLanguage()->
getTitle(),
651 $this->
msg(
'ipb-edit-dropdown' )->text(),
653 [
'action' =>
'edit' ]
657 $text = Html::rawElement(
659 [
'class' =>
'mw-ipb-conveniencelinks' ],
663 $userPage = self::getTargetUserTitle( $this->target );
665 # Get relevant extracts from the block and suppression logs, if possible
668 LogEventsList::showLogExtract(
677 $this->titleFormatter->getText( $userPage ),
679 'showIfEmpty' =>
false
684 # Add suppression block entries if allowed
685 if ( $this->
getAuthority()->isAllowed(
'suppressionlog' ) ) {
686 LogEventsList::showLogExtract(
693 'conds' => [
'log_action' => [
'block',
'reblock',
'unblock' ] ],
695 'blocklog-showsuppresslog',
696 $this->titleFormatter->getText( $userPage ),
698 'showIfEmpty' =>
false
720 if ( is_string( $target ) && IPUtils::isIPAddress( $target ) ) {
721 return PageReferenceValue::localReference(
NS_USER, $target );
742 return MediaWikiServices::getInstance()->getBlockUtils()->parseBlockTarget( $par );
746 $request->getVal(
'wpTarget',
null ),
748 $request->getVal(
'ip',
null ),
750 $request->getVal(
'wpBlockAddress',
null ),
752 foreach ( $possibleTargets as $possibleTarget ) {
753 $targetAndType = MediaWikiServices::getInstance()
755 ->parseBlockTarget( $possibleTarget );
757 if ( $targetAndType[ 1 ] !==
null ) {
761 return $targetAndType;
773 $services = MediaWikiServices::getInstance();
774 return self::processFormInternal(
777 $services->getBlockUserFactory(),
778 $services->getBlockUtils()
792 private static function processFormInternal(
799 $enablePartialActionBlocks = MediaWikiServices::getInstance()
800 ->getMainConfig()->get( MainConfigNames::EnablePartialActionBlocks );
802 $isPartialBlock = isset( $data[
'EditingRestriction'] ) &&
803 $data[
'EditingRestriction'] ===
'partial';
805 # This might have been a hidden field or a checkbox, so interesting data
807 $data[
'Confirm'] = !in_array( $data[
'Confirm'], [
'',
'0',
null,
false ],
true );
809 # If the user has done the form 'properly', they won't even have been given the
810 # option to suppress-block unless they have the 'hideuser' permission
811 if ( !isset( $data[
'HideUser'] ) ) {
812 $data[
'HideUser'] =
false;
817 if (
$type == DatabaseBlock::TYPE_USER ) {
818 $target = $target->getName();
820 # Give admins a heads-up before they go and block themselves. Much messier
821 # to do this for IPs, but it's pretty unlikely they'd ever get the 'block'
822 # permission anyway, although the code does allow for it.
823 # Note: Important to use $target instead of $data['Target']
824 # since both $data['PreviousTarget'] and $target are normalized
825 # but $data['target'] gets overridden by (non-normalized) request variable
826 # from previous request.
827 if ( $target === $performer->
getUser()->getName() &&
828 ( $data[
'PreviousTarget'] !== $target || !$data[
'Confirm'] )
830 return [
'ipb-blockingself',
'ipb-confirmaction' ];
833 if ( $data[
'HideUser'] && !$data[
'Confirm'] ) {
834 return [
'ipb-confirmhideuser',
'ipb-confirmaction' ];
836 } elseif (
$type == DatabaseBlock::TYPE_IP ) {
837 $target = $target->getName();
838 } elseif (
$type != DatabaseBlock::TYPE_RANGE ) {
839 # This should have been caught in the form field validation
840 return [
'badipaddress' ];
845 $blockReason = $data[
'Reason'][0] ??
'';
847 $pageRestrictions = [];
848 $namespaceRestrictions = [];
849 $actionRestrictions = [];
850 if ( $isPartialBlock ) {
851 if ( isset( $data[
'PageRestrictions'] ) && $data[
'PageRestrictions'] !==
'' ) {
852 $titles = explode(
"\n", $data[
'PageRestrictions'] );
853 foreach ( $titles as
$title ) {
854 $pageRestrictions[] = PageRestriction::newFromTitle(
$title );
857 if ( isset( $data[
'NamespaceRestrictions'] ) && $data[
'NamespaceRestrictions'] !==
'' ) {
858 $namespaceRestrictions = array_map(
static function ( $id ) {
860 }, explode(
"\n", $data[
'NamespaceRestrictions'] ) );
863 $enablePartialActionBlocks &&
864 isset( $data[
'ActionRestrictions'] ) &&
865 $data[
'ActionRestrictions'] !==
''
867 $actionRestrictions = array_map(
static function ( $id ) {
869 }, $data[
'ActionRestrictions'] );
872 $restrictions = array_merge( $pageRestrictions, $namespaceRestrictions, $actionRestrictions );
874 if ( !isset( $data[
'Tags'] ) ) {
879 'isCreateAccountBlocked' => $data[
'CreateAccount'],
880 'isHardBlock' => $data[
'HardBlock'],
881 'isAutoblocking' => $data[
'AutoBlock'],
882 'isHideUser' => $data[
'HideUser'],
883 'isPartial' => $isPartialBlock,
886 if ( isset( $data[
'DisableUTEdit'] ) ) {
887 $blockOptions[
'isUserTalkEditBlocked'] = $data[
'DisableUTEdit'];
889 if ( isset( $data[
'DisableEmail'] ) ) {
890 $blockOptions[
'isEmailBlocked'] = $data[
'DisableEmail'];
903 # Indicates whether the user is confirming the block and is aware of
904 # the conflict (did not change the block target in the meantime)
905 $blockNotConfirmed = !$data[
'Confirm'] || ( array_key_exists(
'PreviousTarget', $data )
906 && $data[
'PreviousTarget'] !== $target );
908 # Special case for API - T34434
909 $reblockNotAllowed = ( array_key_exists(
'Reblock', $data ) && !$data[
'Reblock'] );
911 $doReblock = !$blockNotConfirmed && !$reblockNotAllowed;
913 $status = $blockUser->placeBlock( $doReblock );
914 if ( !$status->isOK() ) {
920 $type != DatabaseBlock::TYPE_RANGE
925 && array_key_exists(
'Watch', $data )
928 MediaWikiServices::getInstance()->getWatchlistManager()->addWatchIgnoringRights(
930 Title::makeTitle(
NS_USER, $target )
948 $msg =
$lang ===
null
949 ?
wfMessage(
'ipboptions' )->inContentLanguage()->text()
956 $a = XmlSelect::parseOptionsMessage( $msg );
958 if ( $a && $includeOther ) {
961 $a[
wfMessage(
'ipbother' )->text() ] =
'other';
977 return BlockUser::parseExpiryInput( $expiry );
988 return MediaWikiServices::getInstance()
989 ->getBlockPermissionCheckerFactory()
991 ->checkEmailPermissions();
1010 return MediaWikiServices::getInstance()
1011 ->getBlockPermissionCheckerFactory()
1012 ->newBlockPermissionChecker( $target, $performer )
1013 ->checkBlockPermissions();
1023 return self::processFormInternal(
1026 $this->blockUserFactory,
1036 $out = $this->getOutput();
1037 $out->setPageTitle( $this->msg(
'blockipsuccesssub' ) );
1038 $out->addWikiMsg(
'blockipsuccesstext',
wfEscapeWikiText( $this->target ) );
1050 $search = $this->userNameUtils->getCanonical( $search );
1056 return $this->userNamePrefixSearch
1057 ->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(!defined('MW_SETUP_CALLBACK'))
The persistent session ID (if any) loaded at startup.
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.
Base class for language-specific code.
A class containing constants representing the names of configuration variables.
static durationParam( $duration)
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.
static processForm(array $data, IContextSource $context)
Given the form data, actually implement a block.
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",...
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...
postHtml()
Add footer elements to the form.
getFormFields()
Get the HTMLForm descriptor array for the block form.
__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.
preHtml()
Add header elements like block log entries, etc.
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 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.
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,...
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.
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...
Interface for objects which can provide a MediaWiki context on request.
if(!isset( $args[0])) $lang