MediaWiki
REL1_23
|
Class for pages in NS_FILE. More...
Public Member Functions | |
getName () | |
Return the name of the action this object responds to. | |
getRestriction () | |
Get the permission required to perform this action. | |
onSubmit ($data) | |
Process the form on POST submission. | |
onSuccess () | |
Do something exciting on successful processing of the form. | |
Protected Member Functions | |
alterForm (HTMLForm $form) | |
Play with the HTMLForm if you need to more substantially. | |
checkCanExecute (User $user) | |
Checks if the given user (identified by an object) can perform this action. | |
getDescription () | |
Returns the description that goes below the <h1> tag. | |
getFormFields () | |
Get an HTMLForm descriptor array. | |
getPageTitle () | |
Returns the name that goes in the <h1> page title. | |
Protected Attributes | |
OldLocalFile | $oldFile |
Class for pages in NS_FILE.
Definition at line 50 of file RevertAction.php.
RevertFileAction::alterForm | ( | HTMLForm $ | form | ) | [protected] |
Play with the HTMLForm if you need to more substantially.
HTMLForm | $form |
Reimplemented from FormAction.
Definition at line 84 of file RevertAction.php.
References HTMLForm\addHiddenField(), Action\getRequest(), HTMLForm\setSubmitTextMsg(), and HTMLForm\setWrapperLegendMsg().
RevertFileAction::checkCanExecute | ( | User $ | user | ) | [protected] |
Checks if the given user (identified by an object) can perform this action.
Can be overridden by sub-classes with more complicated permissions schemes. Failures here must throw subclasses of ErrorPageError
User | $user | The user to check, or null to use the context user |
UserBlockedError|ReadOnlyError|PermissionsError |
Reimplemented from Action.
Definition at line 63 of file RevertAction.php.
References array(), Action\getRequest(), Action\getTitle(), and RepoGroup\singleton().
RevertFileAction::getDescription | ( | ) | [protected] |
Returns the description that goes below the <h1> tag.
Reimplemented from Action.
Definition at line 160 of file RevertAction.php.
References Action\getOutput(), and Action\getTitle().
RevertFileAction::getFormFields | ( | ) | [protected] |
Get an HTMLForm descriptor array.
Reimplemented from FormAction.
Definition at line 90 of file RevertAction.php.
References $timestamp, $user, $wgContLang, array(), Action\getLanguage(), Action\getRequest(), Action\getTitle(), Action\getUser(), global, Action\msg(), page, and wfExpandUrl().
Return the name of the action this object responds to.
Reimplemented from Action.
Definition at line 55 of file RevertAction.php.
RevertFileAction::getPageTitle | ( | ) | [protected] |
Returns the name that goes in the <h1> page title.
Reimplemented from Action.
Definition at line 156 of file RevertAction.php.
References Action\getTitle(), and Action\msg().
Get the permission required to perform this action.
Often, but not always, the same as the action name
Reimplemented from Action.
Definition at line 59 of file RevertAction.php.
RevertFileAction::onSubmit | ( | $ | data | ) |
Process the form on POST submission.
If you return false from getFormFields(), this will obviously never be reached. If you don't want to do anything with the form, just return false here
array | $data |
Reimplemented from FormAction.
Definition at line 123 of file RevertAction.php.
References $comment, $source, Action\getRequest(), Action\getUser(), and page.
Do something exciting on successful processing of the form.
This might be to show a confirmation message (watch, rollback, etc) or to redirect somewhere else (edit, protect, etc).
Reimplemented from FormAction.
Definition at line 141 of file RevertAction.php.
References $timestamp, $user, Action\getLanguage(), Action\getOutput(), Action\getRequest(), Action\getTitle(), Action\getUser(), page, and wfExpandUrl().
OldLocalFile RevertFileAction::$oldFile [protected] |
Definition at line 53 of file RevertAction.php.