MediaWiki  REL1_19
RevertFileAction Class Reference

Class for pages in NS_FILE. More...

Inheritance diagram for RevertFileAction:
Collaboration diagram for RevertFileAction:

List of all members.

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

 $oldFile

Detailed Description

Class for pages in NS_FILE.

Definition at line 49 of file RevertAction.php.


Member Function Documentation

RevertFileAction::alterForm ( HTMLForm form) [protected]

Play with the HTMLForm if you need to more substantially.

Parameters:
$formHTMLForm

Reimplemented from FormAction.

Definition at line 77 of file RevertAction.php.

References HTMLForm\addHiddenField(), Action\getRequest(), HTMLForm\setSubmitText(), HTMLForm\setWrapperLegend(), wfMsg(), and wfMsgHtml().

Here is the call graph for this function:

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

Parameters:
$userUser: the user to check, or null to use the context user
Exceptions:
ErrorPageError

Reimplemented from Action.

Definition at line 60 of file RevertAction.php.

References Action\getRequest(), Action\getTitle(), and RepoGroup\singleton().

Here is the call graph for this function:

Returns the description that goes below the <h1> tag.

Returns:
String

Reimplemented from Action.

Definition at line 130 of file RevertAction.php.

References Action\getOutput(), and Action\getTitle().

Here is the call graph for this function:

Get an HTMLForm descriptor array.

Returns:
Array

Reimplemented from FormAction.

Definition at line 83 of file RevertAction.php.

References $wgContLang, Action\getLanguage(), Action\getRequest(), Action\getTitle(), wfExpandUrl(), wfMsgExt(), and wfMsgForContent().

Here is the call graph for this function:

Return the name of the action this object responds to.

Returns:
String lowercase

Reimplemented from Action.

Definition at line 52 of file RevertAction.php.

Returns the name that goes in the <h1> page title.

Returns:
String

Reimplemented from Action.

Definition at line 126 of file RevertAction.php.

References Action\getTitle(), and wfMsg().

Here is the call graph for this function:

Get the permission required to perform this action.

Often, but not always, the same as the action name

Returns:
String|null

Reimplemented from Action.

Definition at line 56 of file RevertAction.php.

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

Parameters:
$dataArray
Returns:
Bool|Array true for success, false for didn't-try, array of errors on failure

Reimplemented from FormAction.

Definition at line 108 of file RevertAction.php.

References $comment, and Action\getRequest().

Here is the call graph for this function:

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 115 of file RevertAction.php.

References Action\getLanguage(), Action\getOutput(), Action\getRequest(), Action\getTitle(), wfExpandUrl(), and wfMsgExt().

Here is the call graph for this function:


Member Data Documentation

RevertFileAction::$oldFile [protected]

Definition at line 50 of file RevertAction.php.


The documentation for this class was generated from the following file: