MediaWiki  REL1_19
SpecialRevisionDelete Class Reference

Special page allowing users with the appropriate permissions to view and hide revisions. More...

Inheritance diagram for SpecialRevisionDelete:
Collaboration diagram for SpecialRevisionDelete:

List of all members.

Public Member Functions

 __construct ()
 execute ($par)
 Default execute method Checks user permissions, calls the function given in mFunction.

Static Public Member Functions

static extractBitfield ($bitPars, $oldfield)
 Put together a rev_deleted bitfield.

Public Attributes

 $archiveName
 Archive name, for reviewing deleted files.
 $checks
 Array of checkbox specs (message, name, deletion bits)
 $ids
 Target ID list.
 $list
 The RevDel_List object, storing the list of items to be deleted/undeleted.
 $submitClicked
 True if the submit button was clicked, and the form was posted.
 $targetObj
 Title object for target parameter.
 $token
 Edit token for securing image views against XSS.
 $typeInfo
 Information about the current type.
 $typeName
 Deletion type, may be revision, archive, oldimage, filearchive, logging.

Static Public Attributes

static $allowedTypes
 Assorted information about each type, needed by the special page.
static $deprecatedTypeMap
 Type map to support old log entries.

Protected Member Functions

 addUsageText ()
 Show some introductory text.
 buildCheckBoxes ()
 extractBitParams ()
 Put together an array that contains -1, 0, or the *_deleted const for each bit.
 failure ($status)
 Report that the submit operation failed.
 getList ()
 Get the list object for this request.
 getLogQueryCond ()
 Get the condition used for fetching log snippets.
 save ($bitfield, $reason, $title)
 Do the write operations.
 showConvenienceLinks ()
 Show some useful links in the subtitle.
 showForm ()
 Show a list of items that we will operate on, and show a form with checkboxes which will allow the user to choose new visibility settings.
 submit ()
 UI entry point for form submission.
 success ()
 Report that the submit operation succeeded.
 tryShowFile ($archiveName)
 Show a deleted file version requested by the visitor.

Detailed Description

Special page allowing users with the appropriate permissions to view and hide revisions.

Log items can also be hidden.

Definition at line 30 of file SpecialRevisiondelete.php.


Constructor & Destructor Documentation


Member Function Documentation

Show some introductory text.

Todo:
FIXME: Wikimedia-specific policy text

Definition at line 436 of file SpecialRevisiondelete.php.

References SpecialPage\getOutput(), and SpecialPage\getUser().

Referenced by showForm().

Here is the call graph for this function:

Here is the caller graph for this function:

Returns:
String: HTML

Definition at line 449 of file SpecialRevisiondelete.php.

References $list, Xml\checkLabel(), Revision\DELETED_RESTRICTED, extractBitfield(), extractBitParams(), getList(), SpecialPage\getRequest(), Xml\radio(), Xml\tags(), wfMsg(), and wfMsgHtml().

Referenced by showForm().

Here is the call graph for this function:

Here is the caller graph for this function:

Default execute method Checks user permissions, calls the function given in mFunction.

This must be overridden by subclasses; it will be made abstract in a future version

Parameters:
$parString subpage string, if one was specified

Reimplemented from SpecialPage.

Definition at line 113 of file SpecialRevisiondelete.php.

References $ids, $output, $user, SpecialPage\checkPermissions(), SpecialPage\checkReadOnly(), Revision\DELETED_COMMENT, Revision\DELETED_RESTRICTED, Revision\DELETED_USER, SpecialPage\getFullTitle(), getLogQueryCond(), SpecialPage\getOutput(), SpecialPage\getRequest(), SpecialPage\getUser(), LogPage\logName(), Revision\newFromId(), Title\newFromText(), SpecialPage\outputHeader(), SpecialPage\setHeaders(), showConvenienceLinks(), showForm(), LogEventsList\showLogExtract(), submit(), and tryShowFile().

Here is the call graph for this function:

static SpecialRevisionDelete::extractBitfield ( bitPars,
oldfield 
) [static]

Put together a rev_deleted bitfield.

Parameters:
$bitParsarray extractBitParams() params
$oldfieldint current bitfield
Returns:
array

Definition at line 580 of file SpecialRevisiondelete.php.

Referenced by buildCheckBoxes(), and RevDel_List\setVisibility().

Here is the caller graph for this function:

Put together an array that contains -1, 0, or the *_deleted const for each bit.

Returns:
array

Definition at line 558 of file SpecialRevisiondelete.php.

References Revision\DELETED_RESTRICTED, and SpecialPage\getRequest().

Referenced by buildCheckBoxes(), and submit().

Here is the call graph for this function:

Here is the caller graph for this function:

SpecialRevisionDelete::failure ( status) [protected]

Report that the submit operation failed.

Definition at line 547 of file SpecialRevisiondelete.php.

References SpecialPage\getOutput(), SpecialPage\msg(), and showForm().

Referenced by submit().

Here is the call graph for this function:

Here is the caller graph for this function:

Get the list object for this request.

Definition at line 322 of file SpecialRevisiondelete.php.

References SpecialPage\getContext().

Referenced by buildCheckBoxes(), getLogQueryCond(), save(), and showForm().

Here is the call graph for this function:

Here is the caller graph for this function:

Get the condition used for fetching log snippets.

Definition at line 255 of file SpecialRevisiondelete.php.

References getList(), and RevisionDeleter\getRelationType().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

SpecialRevisionDelete::save ( bitfield,
reason,
title 
) [protected]

Do the write operations.

Simple wrapper for RevDel_*List::setVisibility().

Definition at line 596 of file SpecialRevisiondelete.php.

References getList().

Referenced by submit().

Here is the call graph for this function:

Here is the caller graph for this function:

Show some useful links in the subtitle.

Definition at line 218 of file SpecialRevisiondelete.php.

References SpecialPage\getLanguage(), SpecialPage\getOutput(), SpecialPage\getTitleFor(), SpecialPage\getUser(), Linker\linkKnown(), and wfMsgHtml().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

Show a list of items that we will operate on, and show a form with checkboxes which will allow the user to choose new visibility settings.

Definition at line 334 of file SpecialRevisiondelete.php.

References $list, $out, $title, addUsageText(), buildCheckBoxes(), Xml\closeElement(), Xml\fieldset(), SpecialPage\getLanguage(), getList(), SpecialPage\getOutput(), SpecialPage\getTitle(), SpecialPage\getUser(), Html\hidden(), Xml\input(), Xml\label(), Linker\link(), Xml\listDropDown(), Title\makeTitle(), Xml\openElement(), Xml\submitButton(), Xml\tags(), wfMsg(), wfMsgExt(), wfMsgForContent(), and wfMsgHtml().

Referenced by execute(), failure(), and success().

Here is the call graph for this function:

Here is the caller graph for this function:

UI entry point for form submission.

Definition at line 501 of file SpecialRevisiondelete.php.

References $comment, $token, Revision\DELETED_RESTRICTED, extractBitParams(), failure(), SpecialPage\getOutput(), SpecialPage\getRequest(), SpecialPage\getUser(), save(), success(), and wfMsgForContent().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

Report that the submit operation succeeded.

Definition at line 537 of file SpecialRevisiondelete.php.

References SpecialPage\getOutput(), SpecialPage\msg(), and showForm().

Referenced by submit().

Here is the call graph for this function:

Here is the caller graph for this function:

SpecialRevisionDelete::tryShowFile ( archiveName) [protected]

Show a deleted file version requested by the visitor.

TODO Mostly copied from Special:Undelete. Refactor.

Definition at line 269 of file SpecialRevisiondelete.php.

References $archiveName, $path, File\DELETED_FILE, File\DELETED_RESTRICTED, SpecialPage\getLanguage(), SpecialPage\getOutput(), SpecialPage\getRequest(), SpecialPage\getTitle(), SpecialPage\getUser(), Xml\openElement(), RepoGroup\singleton(), Xml\submitButton(), and wfMsg().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

SpecialRevisionDelete::$allowedTypes [static]

Assorted information about each type, needed by the special page.

TODO Move some of this to the list class

Definition at line 62 of file SpecialRevisiondelete.php.

Referenced by RevisionDeleter\getRelationType().

SpecialRevisionDelete::$archiveName

Archive name, for reviewing deleted files.

Definition at line 38 of file SpecialRevisiondelete.php.

Referenced by tryShowFile().

SpecialRevisionDelete::$checks

Array of checkbox specs (message, name, deletion bits)

Definition at line 50 of file SpecialRevisiondelete.php.

SpecialRevisionDelete::$deprecatedTypeMap [static]
Initial value:
 array(
                'oldid' => 'revision',
                'artimestamp' => 'archive',
                'oldimage' => 'oldimage',
                'fileid' => 'filearchive',
                'logid' => 'logging',
        )

Type map to support old log entries.

Definition at line 101 of file SpecialRevisiondelete.php.

Referenced by RevisionDeleter\getRelationType().

SpecialRevisionDelete::$ids

Target ID list.

Definition at line 35 of file SpecialRevisiondelete.php.

Referenced by execute().

SpecialRevisionDelete::$list

The RevDel_List object, storing the list of items to be deleted/undeleted.

Definition at line 56 of file SpecialRevisiondelete.php.

Referenced by buildCheckBoxes(), and showForm().

SpecialRevisionDelete::$submitClicked

True if the submit button was clicked, and the form was posted.

Definition at line 32 of file SpecialRevisiondelete.php.

SpecialRevisionDelete::$targetObj

Title object for target parameter.

Definition at line 44 of file SpecialRevisiondelete.php.

SpecialRevisionDelete::$token

Edit token for securing image views against XSS.

Definition at line 41 of file SpecialRevisiondelete.php.

Referenced by submit().

SpecialRevisionDelete::$typeInfo

Information about the current type.

Definition at line 53 of file SpecialRevisiondelete.php.

SpecialRevisionDelete::$typeName

Deletion type, may be revision, archive, oldimage, filearchive, logging.

Definition at line 47 of file SpecialRevisiondelete.php.


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