[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Implements Special:Block This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 978 lines (30 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
SpecialBlock:: (22 methods):
__construct()
checkExecutePermissions()
setParameter()
alterForm()
getFormFields()
maybeAlterFormDefaults()
preText()
postText()
getTargetUserTitle()
getTargetAndType()
validateTargetField()
validateTarget()
processUIForm()
processForm()
getSuggestedDurations()
parseExpiryInput()
canBlockEmail()
checkUnblockSelf()
blockLogFlags()
onSubmit()
onSuccess()
getGroupName()
Class: SpecialBlock - X-Ref
A special page that allows users with 'block' right to block users from__construct() X-Ref |
No description |
checkExecutePermissions( User $user ) X-Ref |
Checks that the user can unblock themselves if they are trying to do so param: User $user |
setParameter( $par ) X-Ref |
Handle some magic here param: string $par |
alterForm( HTMLForm $form ) X-Ref |
Customizes the HTMLForm a bit param: HTMLForm $form |
getFormFields() X-Ref |
Get the HTMLForm descriptor array for the block form return: array |
maybeAlterFormDefaults( &$fields ) X-Ref |
If the user has already been blocked with similar settings, load that block and change the defaults for the form fields to match the existing settings. param: array $fields HTMLForm descriptor array return: bool Whether fields were altered (that is, whether the target is |
preText() X-Ref |
Add header elements like block log entries, etc. return: string |
postText() X-Ref |
Add footer elements to the form return: string |
getTargetUserTitle( $target ) X-Ref |
Get a user page target for things like logs. This handles account and IP range targets. param: User|string $target return: Title|null |
getTargetAndType( $par, WebRequest $request = null ) X-Ref |
Determine the target of the block, and the type of target param: string $par Subpage parameter passed to setup, or data value from param: WebRequest $request Optionally try and get data from a request too return: array( User|string|null, Block::TYPE_ constant|null ) |
validateTargetField( $value, $alldata, $form ) X-Ref |
HTMLForm field validation-callback for Target field. param: string $value param: array $alldata param: HTMLForm $form return: Message |
validateTarget( $value, User $user ) X-Ref |
Validate a block target. param: string $value Block target to check param: User $user Performer of the block return: Status |
processUIForm( array $data, HTMLForm $form ) X-Ref |
Submit callback for an HTMLForm object, will simply pass param: array $data param: HTMLForm $form return: bool|string |
processForm( array $data, IContextSource $context ) X-Ref |
Given the form data, actually implement a block param: array $data param: IContextSource $context return: bool|string |
getSuggestedDurations( $lang = null ) X-Ref |
Get an array of suggested block durations from MediaWiki:Ipboptions param: Language|null $lang The language to get the durations in, or null to use return: array |
parseExpiryInput( $expiry ) X-Ref |
Convert a submitted expiry time, which may be relative ("2 weeks", etc) or absolute ("24 May 2034", etc), into an absolute timestamp we can put into the database. param: string $expiry Whatever was typed into the form return: string Timestamp or "infinity" string for the DB implementation |
canBlockEmail( $user ) X-Ref |
Can we do an email block? param: User $user The sysop wanting to make a block return: bool |
checkUnblockSelf( $user, User $performer ) X-Ref |
bug 15810: blocked admins should not be able to block/unblock others, and probably shouldn't be able to unblock themselves either. param: User|int|string $user param: User $performer User doing the request return: bool|string True or error message key |
blockLogFlags( array $data, $type ) X-Ref |
Return a comma-delimited list of "flags" to be passed to the log reader for this block, to provide more information in the logs param: array $data From HTMLForm data param: int $type Block::TYPE_ constant (USER, RANGE, or IP) return: string |
onSubmit( array $data ) X-Ref |
Process the form on POST submission. param: array $data return: bool|array True for success, false for didn't-try, array of errors on failure |
onSuccess() X-Ref |
Do something exciting on successful processing of the form, most likely to show a confirmation message |
getGroupName() X-Ref |
No description |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |