MediaWiki REL1_35
|
General controller for RevDel, used by both SpecialRevisiondelete and ApiRevisionDelete. More...
Static Public Member Functions | |
static | checkRevisionExistence ( $title, $revid) |
Checks if a revision still exists in the revision table. | |
static | createList ( $typeName, IContextSource $context, Title $title, array $ids) |
Instantiate the appropriate list class for a given list of IDs. | |
static | extractBitfield (array $bitPars, $oldfield) |
Put together a rev_deleted bitfield. | |
static | getCanonicalTypeName ( $typeName) |
Gets the canonical type name, if any. | |
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... Future code for other things may also track other types of revision-specific changes. | |
static | getRestriction ( $typeName) |
Get the user right required for the RevDel type. | |
static | getRevdelConstant ( $typeName) |
Get the revision deletion constant for the RevDel type. | |
static | getTypes () |
Lists the valid possible types for revision deletion. | |
static | suggestTarget ( $typeName, $target, array $ids) |
Suggest a target for the revision deletion. | |
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. | |
Private Attributes | |
const | ALLOWED_TYPES |
List of known revdel types, with their corresponding list classes. | |
const | DEPRECATED_TYPE_MAP |
Type map to support old log entries. | |
General controller for RevDel, used by both SpecialRevisiondelete and ApiRevisionDelete.
Definition at line 31 of file RevisionDeleter.php.
|
staticprotected |
Checks for a change in the bitfield for a certain option and updates the provided array accordingly.
string | $desc | Description to add to the array if the option was enabled / disabled. |
int | $field | The bitmask describing the single option. |
int | $diff | The xor of the old and new bitfields. |
int | $new | The new bitfield |
array | &$arr | The array to update. |
Definition at line 105 of file RevisionDeleter.php.
Referenced by getChanges().
|
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.
Title | $title | |
int | $revid |
Definition at line 217 of file RevisionDeleter.php.
References $dbr, $title, DB_REPLICA, and wfGetDB().
|
static |
Instantiate the appropriate list class for a given list of IDs.
string | $typeName | RevDel type, see RevisionDeleter::getTypes() |
IContextSource | $context | |
Title | $title | |
array | $ids |
MWException |
Definition at line 85 of file RevisionDeleter.php.
References $title, and getCanonicalTypeName().
Referenced by ApiRevisionDelete\execute(), and SpecialRevisionDelete\getList().
|
static |
Put together a rev_deleted bitfield.
array | $bitPars | ExtractBitParams() params |
int | $oldfield | Current bitfield |
Definition at line 241 of file RevisionDeleter.php.
Referenced by SpecialRevisionDelete\buildCheckBoxes(), and RevDelList\setVisibility().
|
static |
Gets the canonical type name, if any.
string | $typeName |
Definition at line 67 of file RevisionDeleter.php.
Referenced by createList(), SpecialRevisionDelete\execute(), getRelationType(), getRestriction(), getRevdelConstant(), and suggestTarget().
|
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 -unhid to the keys respectively.
int | $n | The new bitfield. |
int | $o | The old bitfield. |
Definition at line 129 of file RevisionDeleter.php.
References checkItem().
Referenced by DeleteLogFormatter\getMessageParameters().
|
static |
Get DB field name for URL param... Future code for other things may also track other types of revision-specific changes.
string | $typeName |
Definition at line 156 of file RevisionDeleter.php.
References getCanonicalTypeName().
Referenced by PopulateLogSearch\doDBUpdates(), SpecialRevisionDelete\getLogQueryCond(), and RevDelList\updateLog().
|
static |
Get the user right required for the RevDel type.
string | $typeName |
Definition at line 170 of file RevisionDeleter.php.
References getCanonicalTypeName().
Referenced by SpecialRevisionDelete\execute(), and ApiRevisionDelete\execute().
|
static |
Get the revision deletion constant for the RevDel type.
string | $typeName |
Definition at line 184 of file RevisionDeleter.php.
References getCanonicalTypeName().
Referenced by SpecialRevisionDelete\execute(), and ApiRevisionDelete\execute().
|
static |
Lists the valid possible types for revision deletion.
Definition at line 56 of file RevisionDeleter.php.
Referenced by ApiRevisionDelete\getAllowedParams().
|
static |
Suggest a target for the revision deletion.
string | $typeName | |
Title | null | $target | User-supplied target |
array | $ids |
Definition at line 200 of file RevisionDeleter.php.
References getCanonicalTypeName().
Referenced by SpecialEditTags\execute(), SpecialRevisionDelete\execute(), and ApiRevisionDelete\execute().
|
private |
List of known revdel types, with their corresponding list classes.
Definition at line 33 of file RevisionDeleter.php.
|
private |
Type map to support old log entries.
Definition at line 42 of file RevisionDeleter.php.