MediaWiki  REL1_22
SpecialLockdb Class Reference

A form to make the database readonly (eg for maintenance purposes). More...

Inheritance diagram for SpecialLockdb:
Collaboration diagram for SpecialLockdb:

List of all members.

Public Member Functions

 __construct ()
 checkExecutePermissions (User $user)
 Called from execute() to check if the given user can perform this action.
 onSubmit (array $data)
 Process the form on POST submission.
 onSuccess ()
 Do something exciting on successful processing of the form, most likely to show a confirmation message.
 requiresWrite ()
 Whether this action requires the wiki not to be locked.

Public Attributes

 $reason = ''

Protected Member Functions

 alterForm (HTMLForm $form)
 Play with the HTMLForm if you need to more substantially.
 getFormFields ()
 Get an HTMLForm descriptor array.
 getGroupName ()
 Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.

Detailed Description

A form to make the database readonly (eg for maintenance purposes).

Definition at line 29 of file SpecialLockdb.php.


Constructor & Destructor Documentation

Definition at line 32 of file SpecialLockdb.php.


Member Function Documentation

SpecialLockdb::alterForm ( HTMLForm form) [protected]

Play with the HTMLForm if you need to more substantially.

Parameters:
$formHTMLForm

Reimplemented from FormSpecialPage.

Definition at line 65 of file SpecialLockdb.php.

References SpecialPage\msg(), HTMLForm\setHeaderText(), HTMLForm\setSubmitTextMsg(), and HTMLForm\setWrapperLegend().

Called from execute() to check if the given user can perform this action.

Failures here must throw subclasses of ErrorPageError.

Parameters:
$userUser
Exceptions:
UserBlockedError
Returns:
Bool true

Reimplemented from FormSpecialPage.

Definition at line 40 of file SpecialLockdb.php.

References global.

Get an HTMLForm descriptor array.

Returns:
Array

Reimplemented from FormSpecialPage.

Definition at line 50 of file SpecialLockdb.php.

References array().

SpecialLockdb::getGroupName ( ) [protected]

Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.

Returns:
string
Since:
1.21

Reimplemented from SpecialPage.

Definition at line 106 of file SpecialLockdb.php.

Process the form on POST submission.

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

Reimplemented from FormSpecialPage.

Definition at line 71 of file SpecialLockdb.php.

References $timestamp, $wgContLang, SpecialPage\getName(), SpecialPage\getUser(), global, SpecialPage\msg(), Status\newFatal(), Status\newGood(), wfRestoreWarnings(), wfSuppressWarnings(), and wfTimestampNow().

Do something exciting on successful processing of the form, most likely to show a confirmation message.

Since:
1.22 Default is to do nothing

Reimplemented from FormSpecialPage.

Definition at line 100 of file SpecialLockdb.php.

References $out, SpecialPage\getOutput(), and SpecialPage\msg().

Whether this action requires the wiki not to be locked.

Returns:
Bool

Reimplemented from FormSpecialPage.

Definition at line 36 of file SpecialLockdb.php.


Member Data Documentation

SpecialLockdb::$reason = ''

Definition at line 30 of file SpecialLockdb.php.


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