General controller for RevDel, used by both SpecialRevisiondelete and ApiRevisionDelete.
More...
|
static | createList ( $typeName, IContextSource $context, PageIdentity $page, 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 | checkItem ( $desc, $field, $diff, $new, &$arr) |
| Checks for a change in the bitfield for a certain option and updates the provided array accordingly.
|
|
General controller for RevDel, used by both SpecialRevisiondelete and ApiRevisionDelete.
Definition at line 34 of file RevisionDeleter.php.
◆ checkItem()
static RevisionDeleter::checkItem |
( |
| $desc, |
|
|
| $field, |
|
|
| $diff, |
|
|
| $new, |
|
|
& | $arr ) |
|
staticprotected |
Checks for a change in the bitfield for a certain option and updates the provided array accordingly.
- Parameters
-
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 158 of file RevisionDeleter.php.
◆ createList()
Instantiate the appropriate list class for a given list of IDs.
- Since
- 1.22
- Parameters
-
string | $typeName | RevDel type, see RevisionDeleter::getTypes() |
IContextSource | $context | |
PageIdentity | $page | |
array | $ids | |
- Returns
- RevDelList
- Exceptions
-
Definition at line 128 of file RevisionDeleter.php.
◆ extractBitfield()
static RevisionDeleter::extractBitfield |
( |
array | $bitPars, |
|
|
| $oldfield ) |
|
static |
Put together a rev_deleted bitfield.
- Since
- 1.22
- Parameters
-
array | $bitPars | ExtractBitParams() params |
int | $oldfield | Current bitfield |
- Returns
- int
Definition at line 272 of file RevisionDeleter.php.
◆ getCanonicalTypeName()
static RevisionDeleter::getCanonicalTypeName |
( |
| $typeName | ) |
|
|
static |
Gets the canonical type name, if any.
- Since
- 1.22
- Parameters
-
- Returns
- string|null
Definition at line 110 of file RevisionDeleter.php.
◆ getChanges()
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 -unhid to the keys respectively.
- Parameters
-
int | $n | The new bitfield. |
int | $o | The old bitfield. |
- Returns
- array An array as described above.
- Since
- 1.19 public
Definition at line 182 of file RevisionDeleter.php.
◆ getRelationType()
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.
- Parameters
-
- Returns
- string|null One of log_id/rev_id/fa_id/ar_timestamp/oi_archive_name
Definition at line 209 of file RevisionDeleter.php.
◆ getRestriction()
static RevisionDeleter::getRestriction |
( |
| $typeName | ) |
|
|
static |
Get the user right required for the RevDel type.
- Since
- 1.22
- Parameters
-
- Returns
- string|null User right
Definition at line 223 of file RevisionDeleter.php.
◆ getRevdelConstant()
static RevisionDeleter::getRevdelConstant |
( |
| $typeName | ) |
|
|
static |
Get the revision deletion constant for the RevDel type.
- Since
- 1.22
- Parameters
-
- Returns
- int|null RevDel constant
Definition at line 237 of file RevisionDeleter.php.
◆ getTypes()
static RevisionDeleter::getTypes |
( |
| ) |
|
|
static |
Lists the valid possible types for revision deletion.
- Since
- 1.22
- Returns
- array
Definition at line 99 of file RevisionDeleter.php.
◆ suggestTarget()
static RevisionDeleter::suggestTarget |
( |
| $typeName, |
|
|
| $target, |
|
|
array | $ids ) |
|
static |
Suggest a target for the revision deletion.
- Since
- 1.22
- Parameters
-
string | $typeName | |
Title | null | $target | User-supplied target |
array | $ids | |
- Returns
- Title|null
Definition at line 253 of file RevisionDeleter.php.
The documentation for this class was generated from the following file: