MediaWiki
1.23.2
|
Used to show archived pages and eventually restore them. More...
Public Member Functions | |
__construct ( $title) | |
getFileStatus () | |
getLastRevisionText () | |
Fetch (and decompress if necessary) the stored text of the most recently edited deleted revision of the page. More... | |
getPreviousRevision ( $timestamp) | |
Return the most-previous revision, either live or deleted, against the deleted revision given by timestamp. More... | |
getRevision ( $timestamp) | |
Return a Revision object containing data for the deleted revision. More... | |
getRevisionStatus () | |
getTextFromRow ( $row) | |
Get the text from an archive row containing ar_text, ar_flags and ar_text_id. More... | |
isDeleted () | |
Quick check if any archived revisions are present for the page. More... | |
listFiles () | |
List the deleted file revisions for this page, if it's a file page. More... | |
listRevisions () | |
List the revisions of the given page. More... | |
undelete ( $timestamps, $comment='', $fileVersions=array(), $unsuppress=false, User $user=null) | |
Restore the given (or all) text and file revisions for the page. More... | |
Static Public Member Functions | |
static | listAllPages () |
List all deleted pages recorded in the archive table. More... | |
static | listPagesByPrefix ( $prefix) |
List deleted pages recorded in the archive table matching the given title prefix. More... | |
Static Protected Member Functions | |
static | listPages ( $dbr, $condition) |
Protected Attributes | |
Status | $fileStatus |
Status | $revisionStatus |
Title | $title |
Private Member Functions | |
undeleteRevisions ( $timestamps, $unsuppress=false, $comment='') | |
This is the meaty bit – restores archived revisions of the given page to the cur/old tables. More... | |
Used to show archived pages and eventually restore them.
Definition at line 29 of file SpecialUndelete.php.
PageArchive::__construct | ( | $title | ) |
Definition at line 36 of file SpecialUndelete.php.
PageArchive::getFileStatus | ( | ) |
PageArchive::getLastRevisionText | ( | ) |
Fetch (and decompress if necessary) the stored text of the most recently edited deleted revision of the page.
If there are no archived revisions for the page, returns NULL.
Definition at line 312 of file SpecialUndelete.php.
References $dbr, array(), DB_SLAVE, getTextFromRow(), title, and wfGetDB().
PageArchive::getPreviousRevision | ( | $timestamp | ) |
Return the most-previous revision, either live or deleted, against the deleted revision given by timestamp.
May produce unexpected results in case of history merges or other unusual time issues.
string | $timestamp |
Definition at line 238 of file SpecialUndelete.php.
References $dbr, $timestamp, array(), DB_SLAVE, getRevision(), Revision\newFromId(), title, TS_MW, wfGetDB(), and wfTimestamp().
PageArchive::getRevision | ( | $timestamp | ) |
Return a Revision object containing data for the deleted revision.
Note that the result may or may not have a null page ID.
string | $timestamp |
Definition at line 189 of file SpecialUndelete.php.
References $dbr, $timestamp, array(), DB_SLAVE, global, Revision\newFromArchiveRow(), title, and wfGetDB().
Referenced by getPreviousRevision().
PageArchive::getRevisionStatus | ( | ) |
PageArchive::getTextFromRow | ( | $row | ) |
Get the text from an archive row containing ar_text, ar_flags and ar_text_id.
object | $row | Database row |
Definition at line 287 of file SpecialUndelete.php.
References $dbr, array(), DB_SLAVE, Revision\getRevisionText(), and wfGetDB().
Referenced by getLastRevisionText().
PageArchive::isDeleted | ( | ) |
|
static |
List all deleted pages recorded in the archive table.
Returns result wrapper with (ar_namespace, ar_title, count) fields, ordered by page namespace/title.
Definition at line 50 of file SpecialUndelete.php.
References $dbr, DB_SLAVE, listPages(), and wfGetDB().
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 165 of file SpecialUndelete.php.
References $dbr, $res, array(), DB_SLAVE, NS_FILE, ArchivedFile\selectFields(), title, and wfGetDB().
|
staticprotected |
DatabaseBase | $dbr | |
string | array | $condition |
Definition at line 90 of file SpecialUndelete.php.
Referenced by listAllPages(), and listPagesByPrefix().
|
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 64 of file SpecialUndelete.php.
References $dbr, $title, array(), DB_SLAVE, Title\getDBkey(), Title\getNamespace(), listPages(), Title\newFromText(), and wfGetDB().
Referenced by SpecialUndelete\showSearchForm().
PageArchive::listRevisions | ( | ) |
List the revisions of the given page.
Returns result wrapper with (ar_minor_edit, ar_timestamp, ar_user, ar_user_text, ar_comment) fields.
Definition at line 114 of file SpecialUndelete.php.
References $dbr, $options, $res, $tables, array(), DB_SLAVE, global, ChangeTags\modifyDisplayQuery(), title, and wfGetDB().
PageArchive::undelete | ( | $timestamps, | |
$comment = '' , |
|||
$fileVersions = array() , |
|||
$unsuppress = false , |
|||
User | $user = 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. |
string | $comment | |
array | $fileVersions | |
bool | $unsuppress | |
User | $user | User performing the action, or null to use $wgUser |
Definition at line 358 of file SpecialUndelete.php.
References $comment, $user, $wgUser, array(), global, NS_FILE, title, undeleteRevisions(), wfDebug(), wfLocalFile(), wfMessage(), and wfRunHooks().
|
private |
This is the meaty bit – restores archived revisions of the given page to the cur/old tables.
If the page currently exists, all revisions will be stuffed into old, otherwise the most recent will go into cur.
array | $timestamps | Pass an empty array to restore all revisions, otherwise list the ones to undelete. |
bool | $unsuppress | Remove all ar_deleted/fa_deleted restrictions of seletected revs |
string | $comment |
ReadOnlyError |
Definition at line 441 of file SpecialUndelete.php.
References $article, $comment, $ret, $user, array(), as, DB_MASTER, Revision\DELETED_TEXT, WikiPage\factory(), false, global, Status\newFatal(), Revision\newFromArchiveRow(), User\newFromName(), Status\newGood(), NS_FILE, Revision\RAW, title, wfDebug(), wfGetDB(), wfReadOnly(), and wfRunHooks().
Referenced by undelete().
|
protected |
|
protected |
|
protected |
Definition at line 30 of file SpecialUndelete.php.
Referenced by __construct(), and listPagesByPrefix().