[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/revisiondelete/ -> RevisionDeleter.php (summary)

Revision/log/file deletion backend 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.

File Size: 249 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

RevisionDeleter:: (11 methods):
  getTypes()
  getCanonicalTypeName()
  createList()
  checkItem()
  getChanges()
  getRelationType()
  getRestriction()
  getRevdelConstant()
  suggestTarget()
  checkRevisionExistence()
  extractBitfield()


Class: RevisionDeleter  - X-Ref

General controller for RevDel, used by both SpecialRevisiondelete and
ApiRevisionDelete.

getTypes()   X-Ref
Lists the valid possible types for revision deletion.

return: array

getCanonicalTypeName( $typeName )   X-Ref
Gets the canonical type name, if any.

param: string $typeName
return: string|null

createList( $typeName, IContextSource $context, Title $title, array $ids )   X-Ref
Instantiate the appropriate list class for a given list of IDs.

param: string $typeName RevDel type, see RevisionDeleter::getTypes()
param: IContextSource $context
param: Title $title
param: array $ids
return: RevDelList

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

param: string $desc Description to add to the array if the option was
param: int $field The bitmask describing the single option.
param: int $diff The xor of the old and new bitfields.
param: int $new The new bitfield
param: array $arr The array to update.

getChanges( $n, $o )   X-Ref
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.

param: int $n The new bitfield.
param: int $o The old bitfield.
return: array An array as described above.

getRelationType( $typeName )   X-Ref
No description

getRestriction( $typeName )   X-Ref
Get the user right required for the RevDel type

param: string $typeName
return: string User right

getRevdelConstant( $typeName )   X-Ref
Get the revision deletion constant for the RevDel type

param: string $typeName
return: int RevDel constant

suggestTarget( $typeName, $target, array $ids )   X-Ref
Suggest a target for the revision deletion

param: string $typeName
param: Title|null $target User-supplied target
param: array $ids
return: Title|null

checkRevisionExistence( $title, $revid )   X-Ref
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.

param: Title $title
param: int $revid
return: bool|mixed

extractBitfield( $bitPars, $oldfield )   X-Ref
Put together a rev_deleted bitfield

param: array $bitPars ExtractBitParams() params
param: int $oldfield Current bitfield
return: array



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1