MediaWiki
REL1_19
|
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. | |
getPreviousRevision ($timestamp) | |
Return the most-previous revision, either live or deleted, against the deleted revision given by timestamp. | |
getRevision ($timestamp) | |
Return a Revision object containing data for the deleted revision. | |
getTextFromRow ($row) | |
Get the text from an archive row containing ar_text, ar_flags and ar_text_id. | |
isDeleted () | |
Quick check if any archived revisions are present for the page. | |
listFiles () | |
List the deleted file revisions for this page, if it's a file page. | |
listRevisions () | |
List the revisions of the given page. | |
undelete ($timestamps, $comment= '', $fileVersions=array(), $unsuppress=false) | |
Restore the given (or all) text and file revisions for the page. | |
Static Public Member Functions | |
static | listAllPages () |
List all deleted pages recorded in the archive table. | |
static | listPagesByPrefix ($prefix) |
List deleted pages recorded in the archive table matching the given title prefix. | |
Public Attributes | |
$fileStatus | |
Static Protected Member Functions | |
static | listPages ($dbr, $condition) |
Protected Attributes | |
$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. |
Used to show archived pages and eventually restore them.
Definition at line 29 of file SpecialUndelete.php.
PageArchive::__construct | ( | $ | title | ) |
Definition at line 37 of file SpecialUndelete.php.
References $title.
Definition at line 563 of file SpecialUndelete.php.
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 287 of file SpecialUndelete.php.
References $dbr, getTextFromRow(), 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.
$timestamp | String |
Definition at line 214 of file SpecialUndelete.php.
References $dbr, getRevision(), Revision\newFromId(), 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.
$timestamp | String |
Definition at line 176 of file SpecialUndelete.php.
References $dbr, Revision\newFromArchiveRow(), and wfGetDB().
Referenced by getPreviousRevision().
PageArchive::getTextFromRow | ( | $ | row | ) |
Get the text from an archive row containing ar_text, ar_flags and ar_text_id.
$row | Object: database row |
Definition at line 263 of file SpecialUndelete.php.
References $dbr, Revision\getRevisionText(), and wfGetDB().
Referenced by getLastRevisionText().
Quick check if any archived revisions are present for the page.
Definition at line 307 of file SpecialUndelete.php.
References $dbr, $n, and wfGetDB().
static PageArchive::listAllPages | ( | ) | [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 51 of file SpecialUndelete.php.
References $dbr, listPages(), and wfGetDB().
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 137 of file SpecialUndelete.php.
References $dbr, $res, and wfGetDB().
static PageArchive::listPages | ( | $ | dbr, |
$ | condition | ||
) | [static, protected] |
$dbr | DatabaseBase |
$condition |
Definition at line 88 of file SpecialUndelete.php.
References $dbr.
Referenced by listAllPages(), and listPagesByPrefix().
static PageArchive::listPagesByPrefix | ( | $ | prefix | ) | [static] |
List deleted pages recorded in the archive table matching the given title prefix.
Returns result wrapper with (ar_namespace, ar_title, count) fields.
$prefix | String: title prefix |
Definition at line 64 of file SpecialUndelete.php.
References $dbr, $title, listPages(), Title\newFromText(), and wfGetDB().
Referenced by SpecialUndelete\showSearchForm().
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, $res, and wfGetDB().
PageArchive::undelete | ( | $ | timestamps, |
$ | comment = '' , |
||
$ | fileVersions = array() , |
||
$ | unsuppress = false |
||
) |
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.
$timestamps | Array: pass an empty array to restore all revisions, otherwise list the ones to undelete. |
$comment | String |
$fileVersions | Array |
$unsuppress | Boolean |
Definition at line 328 of file SpecialUndelete.php.
References $comment, $wgContLang, undeleteRevisions(), wfDebug(), wfLocalFile(), wfMsgExt(), and wfMsgForContent().
PageArchive::undeleteRevisions | ( | $ | timestamps, |
$ | unsuppress = false , |
||
$ | comment = '' |
||
) | [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.
$timestamps | Array: pass an empty array to restore all revisions, otherwise list the ones to undelete. |
$comment | String |
$unsuppress | Boolean: remove all ar_deleted/fa_deleted restrictions of seletected revs |
Definition at line 394 of file SpecialUndelete.php.
References $comment, $page, $result, $user, Revision\DELETED_TEXT, WikiPage\factory(), false, Revision\newFromArchiveRow(), User\newFromName(), wfDebug(), wfGetDB(), wfReadOnly(), and wfRunHooks().
Referenced by undelete().
PageArchive::$fileStatus |
Definition at line 35 of file SpecialUndelete.php.
PageArchive::$title [protected] |
Definition at line 34 of file SpecialUndelete.php.
Referenced by __construct(), and listPagesByPrefix().