Go to the documentation of this file.
36 parent::__construct(
'Unblock',
'block' );
45 if ( $this->target instanceof
User ) {
46 # Set the 'relevant user' in the skin, so it displays links like Contributions,
47 # User logs, UserRights, etc.
48 $this->
getSkin()->setRelevantUser( $this->target );
55 $out->setPageTitle( $this->
msg(
'unblockip' ) );
56 $out->addModules(
'mediawiki.special' );
59 $form->setWrapperLegendMsg(
'unblockip' );
60 $form->setSubmitCallback(
array( __CLASS__,
'processUIUnblock' ) );
61 $form->setSubmitTextMsg(
'ipusubmit' );
62 $form->addPreText( $this->
msg(
'unblockiptext' )->parseAsBlock() );
64 if (
$form->show() ) {
65 switch ( $this->
type ) {
85 'label-message' =>
'ipadressorusername',
92 'label-message' =>
'ipadressorusername',
96 'label-message' =>
'ipbreason',
103 # Autoblocks are logged as "autoblock #123 because the IP was recently used by
104 # User:Foo, and we've just got any block, auto or not, that applies to a target
105 # the user has specified. Someone could be fishing to connect IPs to autoblocks,
106 # so don't show any distinction between unblocked IPs and autoblocked IPs
109 unset( $fields[
'Name'] );
111 $fields[
'Target'][
'default'] =
$target;
112 $fields[
'Target'][
'type'] =
'hidden';
120 $fields[
'Name'][
'raw'] =
true;
124 $fields[
'Name'][
'default'] =
$target;
128 $fields[
'Name'][
'default'] = $this->
block->getRedactedName();
129 $fields[
'Name'][
'raw'] =
true;
130 # Don't expose the real target of the autoblock
131 $fields[
'Target'][
'default'] =
"#{$this->target}";
137 unset( $fields[
'Name'] );
162 $performer = $context->
getUser();
170 # bug 15810: blocked admins should have limited access here. This
171 # won't allow sysops to remove autoblocks on themselves, but they
172 # should have ipblock-exempt anyway
174 if ( $status !==
true ) {
178 # If the specified IP is a single address, and the block is a range block, don't
179 # unblock the whole range.
182 $range =
$block->getTarget();
187 # If the name was hidden and the blocking user cannot hide
188 # names, then don't allow any block removals...
189 if ( !$performer->isAllowed(
'hideuser' ) &&
$block->mHideName ) {
190 return array(
'unblock-hideuser' );
194 if ( !
$block->delete() ) {
195 return array(
'ipb_cant_unblock', htmlspecialchars(
$block->getTarget() ) );
198 # Unset _deleted fields as needed
199 if (
$block->mHideName ) {
200 # Something is deeply FUBAR if this is not a User object, but who knows?
202 ?
$block->getTarget()->getID()
208 # Redact the name (IP address) for autoblocks
213 ?
$block->getTarget()->getUserpage()
219 $log->addEntry(
'unblock', $page, $data[
'Reason'],
array(), $performer );
static processUnblock(array $data, IContextSource $context)
Process the form.
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
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
getOutput()
Get the OutputPage being used for this instance.
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
checkPermissions()
Checks if userCanExecute, and if not throws a PermissionsError.
static newFromTarget( $specificTarget, $vagueTarget=null, $fromMaster=false)
Given a target and the target's type, get an existing Block object if possible.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
getSkin()
Shortcut to get the skin being used for this instance.
static unsuppressUserName( $name, $userId, $dbw=null)
static link( $target, $html=null, $customAttribs=array(), $query=array(), $options=array())
This function returns an HTML link to the given target.
Class to simplify the use of log pages.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
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
getContext()
Gets the context this SpecialPage is executed in.
static processUIUnblock(array $data, HTMLForm $form)
Submit callback for an HTMLForm object.
execute( $par)
Default execute method Checks user permissions, calls the function given in mFunction.
msg()
Wrapper around wfMessage that sets the current context.
Parent class for all special pages.
getRequest()
Get the WebRequest being used for this instance.
wfEscapeWikiText( $text)
Escapes the given text so that it may be output using addWikiText() without any linking,...
getUser()
Get the User object.
div flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LoginAuthenticateAudit' this hook is for auditing only etc block
Interface for objects which can provide a context on request.
static idFromName( $name)
Get database id given a user name.
This document describes the state of Postgres support in and is fairly well maintained The main code is very well while extensions are very hit and miss it is probably the most supported database after MySQL Much of the work in making MediaWiki database agnostic came about through the work of creating Postgres as and are nearing end of but without copying over all the usage comments General notes on the but these can almost always be programmed around *Although Postgres has a true BOOLEAN type
static checkUnblockSelf( $user, User $performer)
bug 15810: blocked admins should not be able to block/unblock others, and probably shouldn't be able ...
static getTargetAndType( $par, WebRequest $request=null)
Determine the target of the block, and the type of target TODO: should be in Block....
checkReadOnly()
If the wiki is currently in readonly mode, throws a ReadOnlyError.
A special page for unblocking users.
An error page which can definitely be safely rendered using the OutputPage.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...