MediaWiki  REL1_20
RevisionDeleter Class Reference

Temporary b/c interface, collection of static functions. More...

List of all members.

Static Public Member Functions

static checkRevisionExistence ($title, $revid)
 Checks if a revision still exists in the revision table.
static getChanges ($n, $o)
 Gets an array of message keys describing the changes made to the visibility of the revision.
static getRelationType ($typeName)
 Get DB field name for URL param...

Static Protected Member Functions

static checkItem ($desc, $field, $diff, $new, &$arr)
 Checks for a change in the bitfield for a certain option and updates the provided array accordingly.

Detailed Description

Temporary b/c interface, collection of static functions.

Definition at line 29 of file RevisionDeleter.php.


Member Function Documentation

static RevisionDeleter::checkItem ( desc,
field,
diff,
new,
&$  arr 
) [static, protected]

Checks for a change in the bitfield for a certain option and updates the provided array accordingly.

Parameters:
$descString: description to add to the array if the option was enabled / disabled.
$fieldInteger: the bitmask describing the single option.
$diffInteger: the xor of the old and new bitfields.
$newInteger: the new bitfield
$arrArray: the array to update.

Definition at line 41 of file RevisionDeleter.php.

Referenced by getChanges().

static RevisionDeleter::checkRevisionExistence ( title,
revid 
) [static]

Checks if a revision still exists in the revision table.

If it doesn't, returns the corresponding ar_timestamp field so that this key can be used instead.

Parameters:
$titleTitle
$revid
Returns:
bool|mixed

Definition at line 111 of file RevisionDeleter.php.

References $dbr, $title, and wfGetDB().

static RevisionDeleter::getChanges ( n,
o 
) [static]

Gets an array of message keys describing the changes made to the visibility of the revision.

If the resulting array is $arr, then $arr[0] will contain an array of keys describing the items that were hidden, $arr[1] will contain an array of keys describing the items that were unhidden, and $arr[2] will contain an array with a single message key, which can be one of "revdelete-restricted", "revdelete-unrestricted" indicating (un)suppression or null to indicate nothing in particular. You can turn the keys in $arr[0] and $arr[1] into message keys by appending -hid and and -unhid to the keys respectively.

Parameters:
$nInteger: the new bitfield.
$oInteger: the old bitfield.
Returns:
array An array as described above.
Since:
1.19 public

Definition at line 65 of file RevisionDeleter.php.

References $n, checkItem(), Revision\DELETED_COMMENT, Revision\DELETED_RESTRICTED, Revision\DELETED_TEXT, and Revision\DELETED_USER.

static RevisionDeleter::getRelationType ( typeName) [static]

Get DB field name for URL param...

Future code for other things may also track other types of revision-specific changes.

Returns:
string One of log_id/rev_id/fa_id/ar_timestamp/oi_archive_name

Definition at line 90 of file RevisionDeleter.php.

References SpecialRevisionDelete\$allowedTypes, and SpecialRevisionDelete\$deprecatedTypeMap.

Referenced by PopulateLogSearch\doDBUpdates(), and SpecialRevisionDelete\getLogQueryCond().


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