FileRevertForm Class Reference

File reversion user interface. More...

List of all members.

Public Member Functions

 __construct ($file)
 Constructor.
 execute ()
 Fulfil the request; shows the form or reverts the file, pending authentication, confirmation, etc.

Protected Member Functions

 showForm ()
 Show the confirmation form.
 setHeaders ()
 Set headers, titles and other bits.
 isValidOldSpec ()
 Is the provided `oldimage` value valid?
 haveOldVersion ()
 Does the provided `oldimage` value correspond to an existing, local, old version of this file?
 getAction ()
 Prepare the form action.
 getTimestamp ()
 Extract the timestamp of the old version.
 getOldFile ()

Protected Attributes

 $title = null
 $file = null
 $archiveName = ''
 $timestamp = false
 $oldFile


Detailed Description

File reversion user interface.

Author:
Rob Church <robchur@gmail.com>

Definition at line 9 of file FileRevertForm.php.


Constructor & Destructor Documentation

FileRevertForm::__construct ( file  ) 

Constructor.

Parameters:
File $file File we're reverting

Definition at line 22 of file FileRevertForm.php.

References $file.


Member Function Documentation

FileRevertForm::execute (  ) 

Fulfil the request; shows the form or reverts the file, pending authentication, confirmation, etc.

Definition at line 31 of file FileRevertForm.php.

References $source, $status, $wgLang, $wgOut, $wgRequest, $wgUser, getTimestamp(), haveOldVersion(), isValidOldSpec(), setHeaders(), showForm(), wfExpandUrl(), wfMsgExt(), and wfReadOnly().

FileRevertForm::getAction (  )  [protected]

Prepare the form action.

Returns:
string

Definition at line 146 of file FileRevertForm.php.

Referenced by showForm().

FileRevertForm::getOldFile (  )  [protected]

Definition at line 165 of file FileRevertForm.php.

References RepoGroup::singleton().

Referenced by getTimestamp(), and haveOldVersion().

FileRevertForm::getTimestamp (  )  [protected]

Extract the timestamp of the old version.

Returns:
string

Definition at line 158 of file FileRevertForm.php.

References getOldFile().

Referenced by execute(), and showForm().

FileRevertForm::haveOldVersion (  )  [protected]

Does the provided `oldimage` value correspond to an existing, local, old version of this file?

Returns:
bool

Definition at line 137 of file FileRevertForm.php.

References getOldFile().

Referenced by execute().

FileRevertForm::isValidOldSpec (  )  [protected]

Is the provided `oldimage` value valid?

Returns:
bool

Definition at line 125 of file FileRevertForm.php.

Referenced by execute().

FileRevertForm::setHeaders (  )  [protected]

Set headers, titles and other bits.

Definition at line 113 of file FileRevertForm.php.

References $wgOut, $wgUser, and wfMsg().

Referenced by execute().

FileRevertForm::showForm (  )  [protected]


Member Data Documentation

FileRevertForm::$archiveName = '' [protected]

Definition at line 13 of file FileRevertForm.php.

FileRevertForm::$file = null [protected]

Definition at line 12 of file FileRevertForm.php.

Referenced by __construct().

FileRevertForm::$oldFile [protected]

Definition at line 15 of file FileRevertForm.php.

FileRevertForm::$timestamp = false [protected]

Definition at line 14 of file FileRevertForm.php.

Referenced by showForm().

FileRevertForm::$title = null [protected]

Definition at line 11 of file FileRevertForm.php.


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

Generated on Sat Sep 5 02:08:37 2009 for MediaWiki by  doxygen 1.5.9