ProtectionForm Class Reference

Copyright (C) 2005 Brion Vibber <brion@pobox.com> http://www.mediawiki.org/. More...

List of all members.

Public Member Functions

 __construct (Article $article)
 getExpiry ($action)
 Get the expiry time for a given action, by combining the relevant inputs.
 execute ()
 show ($err=null)
 save ()
 buildForm ()
 Build the input form.
 buildSelector ($action, $selected)
 buildScript ()
 buildCleanupScript ()
 showLogExtract (&$out)

Public Attributes

 $mRestrictions = array()
 A map of action to restriction level, from request or default.
 $mReason = ''
 The custom/additional protection reason.
 $mReasonSelection = ''
 The reason selected from the list, blank for other/additional.
 $mCascade = false
 True if the restrictions are cascading, from request or existing protection.
 $mExpiry = array()
 Map of action to "other" expiry time.
 $mExpirySelection = array()
 Map of action to value selected in expiry drop-down list.
 $mPermErrors = array()
 Permissions errors for the protect action.
 $mApplicableTypes = array()
 Types (i.e.
 $mExistingExpiry = array()
 Map of action to the expiry time of the existing protection.

Private Member Functions

 getOptionLabel ($permission)
 Prepare the label for a protection selector option.


Detailed Description

Copyright (C) 2005 Brion Vibber <brion@pobox.com> http://www.mediawiki.org/.

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.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html Handles the page protection UI and backend

Definition at line 25 of file ProtectionForm.php.


Constructor & Destructor Documentation

ProtectionForm::__construct ( Article article  ) 


Member Function Documentation

ProtectionForm::buildCleanupScript (  ) 

ProtectionForm::buildForm (  ) 

ProtectionForm::buildScript (  ) 

Definition at line 514 of file ProtectionForm.php.

References $wgStylePath, $wgStyleVersion, and Xml::tags().

Referenced by buildForm().

ProtectionForm::buildSelector ( action,
selected 
)

ProtectionForm::execute (  ) 

Definition at line 158 of file ProtectionForm.php.

References $wgOut, $wgRequest, save(), and show().

ProtectionForm::getExpiry ( action  ) 

Get the expiry time for a given action, by combining the relevant inputs.

Returns a 14-char timestamp or "infinity", or false if the input was invalid

Definition at line 134 of file ProtectionForm.php.

References $action, Block::infinity(), and wfTimestamp().

Referenced by save().

ProtectionForm::getOptionLabel ( permission  )  [private]

Prepare the label for a protection selector option.

Parameters:
string $permission Permission required
Returns:
string

Definition at line 502 of file ProtectionForm.php.

References $key, $msg, wfEmptyMsg(), and wfMsg().

Referenced by buildSelector().

ProtectionForm::save (  ) 

ProtectionForm::show ( err = null  ) 

Definition at line 170 of file ProtectionForm.php.

References $title, $wgOut, $wgUser, buildForm(), showLogExtract(), wfMsg(), wfMsgHtml(), and wfReadOnly().

Referenced by execute(), and save().

ProtectionForm::showLogExtract ( &$  out  ) 

Parameters:
OutputPage $out private

Definition at line 547 of file ProtectionForm.php.

References $out, Xml::element(), and LogPage::logName().

Referenced by show().


Member Data Documentation

ProtectionForm::$mApplicableTypes = array()

Types (i.e.

actions) for which levels can be selected

Definition at line 51 of file ProtectionForm.php.

ProtectionForm::$mCascade = false

True if the restrictions are cascading, from request or existing protection.

Definition at line 36 of file ProtectionForm.php.

ProtectionForm::$mExistingExpiry = array()

Map of action to the expiry time of the existing protection.

Definition at line 54 of file ProtectionForm.php.

ProtectionForm::$mExpiry = array()

Map of action to "other" expiry time.

Used in preference to mExpirySelection.

Definition at line 39 of file ProtectionForm.php.

ProtectionForm::$mExpirySelection = array()

Map of action to value selected in expiry drop-down list.

Will be set to 'othertime' whenever mExpiry is set.

Definition at line 45 of file ProtectionForm.php.

ProtectionForm::$mPermErrors = array()

Permissions errors for the protect action.

Definition at line 48 of file ProtectionForm.php.

ProtectionForm::$mReason = ''

The custom/additional protection reason.

Definition at line 30 of file ProtectionForm.php.

ProtectionForm::$mReasonSelection = ''

The reason selected from the list, blank for other/additional.

Definition at line 33 of file ProtectionForm.php.

ProtectionForm::$mRestrictions = array()

A map of action to restriction level, from request or default.

Definition at line 27 of file ProtectionForm.php.


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

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