MediaWiki master
|
Used to show archived pages and eventually restore them. More...
Public Member Functions | |
__construct (Title $title) | |
listFiles () | |
List the deleted file revisions for this page, if it's a file page. | |
undeleteAsUser ( $timestamps, UserIdentity $user, $comment='', $fileVersions=[], $unsuppress=false, $tags=null) | |
Restore the given (or all) text and file revisions for the page. | |
Static Public Member Functions | |
static | listPagesByPrefix ( $prefix) |
List deleted pages recorded in the archive table matching the given title prefix. | |
static | listPagesBySearch ( $term) |
List deleted pages recorded in the archive matching the given term, using search engine archive. | |
Static Protected Member Functions | |
static | listPages (IReadableDatabase $dbr, $condition) |
Protected Attributes | |
Title | $title |
Used to show archived pages and eventually restore them.
Definition at line 35 of file PageArchive.php.
PageArchive::__construct | ( | Title | $title | ) |
Title | $title |
Definition at line 42 of file PageArchive.php.
PageArchive::listFiles | ( | ) |
List the deleted file revisions for this page, if it's a file page.
Returns a result wrapper with various filearchive fields, or null if not a file page.
Definition at line 149 of file PageArchive.php.
References NS_FILE.
|
staticprotected |
IReadableDatabase | $dbr | |
string | array | $condition |
Definition at line 130 of file PageArchive.php.
References Wikimedia\Rdbms\IReadableDatabase\newSelectQueryBuilder().
|
static |
List deleted pages recorded in the archive table matching the given title prefix.
Returns result wrapper with (ar_namespace, ar_title, count) fields.
string | $prefix | Title prefix |
Definition at line 104 of file PageArchive.php.
References MediaWiki\Title\Title\getDBkey(), and MediaWiki\Title\Title\getNamespace().
|
static |
List deleted pages recorded in the archive matching the given term, using search engine archive.
Returns result wrapper with (ar_namespace, ar_title, count) fields.
string | $term | Search term |
Definition at line 54 of file PageArchive.php.
References MediaWiki\Title\Title\getDBkey(), MediaWiki\Title\Title\getNamespace(), and MediaWiki\Title\Title\getText().
PageArchive::undeleteAsUser | ( | $timestamps, | |
UserIdentity | $user, | ||
$comment = '', | |||
$fileVersions = [], | |||
$unsuppress = false, | |||
$tags = null ) |
Restore the given (or all) text and file revisions for the page.
Once restored, the items will be removed from the archive tables. The deletion log will be updated with an undeletion notice.
array | $timestamps | Pass an empty array to restore all revisions, otherwise list the ones to undelete. |
UserIdentity | $user | |
string | $comment | |
array | $fileVersions | |
bool | $unsuppress | |
string | string[] | null | $tags | Change tags to add to log entry ($user should be able to add the specified tags before this is called) |
Definition at line 180 of file PageArchive.php.
References wfDeprecated().
|
protected |
Definition at line 37 of file PageArchive.php.