[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Implements Special:Undelete 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: | 1689 lines (48 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
PageArchive:: (15 methods):
__construct()
listAllPages()
listPagesByPrefix()
listPages()
listRevisions()
listFiles()
getRevision()
getPreviousRevision()
getTextFromRow()
getLastRevisionText()
isDeleted()
undelete()
undeleteRevisions()
getFileStatus()
getRevisionStatus()
SpecialUndelete:: (21 methods):
__construct()
loadRequest()
isAllowed()
userCanExecute()
execute()
showSearchForm()
showList()
showRevision()
showDiff()
diffHeader()
showFileConfirmationForm()
showFile()
showHistory()
formatRevisionRow()
formatFileRow()
getPageLink()
getFileLink()
getFileUser()
getFileComment()
undelete()
getGroupName()
Class: PageArchive - X-Ref
Used to show archived pages and eventually restore them.__construct( $title, Config $config = null ) X-Ref |
No description |
listAllPages() X-Ref |
List all deleted pages recorded in the archive table. Returns result wrapper with (ar_namespace, ar_title, count) fields, ordered by page namespace/title. return: ResultWrapper |
listPagesByPrefix( $prefix ) X-Ref |
List deleted pages recorded in the archive table matching the given title prefix. Returns result wrapper with (ar_namespace, ar_title, count) fields. param: string $prefix Title prefix return: ResultWrapper |
listPages( $dbr, $condition ) X-Ref |
param: DatabaseBase $dbr param: string|array $condition return: bool|ResultWrapper |
listRevisions() X-Ref |
List the revisions of the given page. Returns result wrapper with (ar_minor_edit, ar_timestamp, ar_user, ar_user_text, ar_comment) fields. return: ResultWrapper |
listFiles() X-Ref |
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. return: ResultWrapper |
getRevision( $timestamp ) X-Ref |
Return a Revision object containing data for the deleted revision. Note that the result *may* or *may not* have a null page ID. param: string $timestamp return: Revision|null |
getPreviousRevision( $timestamp ) X-Ref |
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. param: string $timestamp return: Revision|null Null when there is no previous revision |
getTextFromRow( $row ) X-Ref |
Get the text from an archive row containing ar_text, ar_flags and ar_text_id param: object $row Database row return: string |
getLastRevisionText() X-Ref |
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. return: string|null |
isDeleted() X-Ref |
Quick check if any archived revisions are present for the page. return: bool |
undelete( $timestamps, $comment = '', $fileVersions = array() X-Ref |
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. param: array $timestamps Pass an empty array to restore all revisions, param: string $comment param: array $fileVersions param: bool $unsuppress param: User $user User performing the action, or null to use $wgUser return: array(number of file revisions restored, number of image revisions |
undeleteRevisions( $timestamps, $unsuppress = false, $comment = '' ) X-Ref |
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. param: array $timestamps Pass an empty array to restore all revisions, param: bool $unsuppress Remove all ar_deleted/fa_deleted restrictions of seletected revs param: string $comment return: Status Status object containing the number of revisions restored on success |
getFileStatus() X-Ref |
return: Status |
getRevisionStatus() X-Ref |
return: Status |
Class: SpecialUndelete - X-Ref
Special page allowing users with the appropriate permissions to view__construct() X-Ref |
No description |
loadRequest( $par ) X-Ref |
No description |
isAllowed( $permission, User $user = null ) X-Ref |
Checks whether a user is allowed the permission for the specific title if one is set. param: string $permission param: User $user return: bool |
userCanExecute( User $user ) X-Ref |
No description |
execute( $par ) X-Ref |
No description |
showSearchForm() X-Ref |
No description |
showList( $result ) X-Ref |
Generic list of deleted pages param: ResultWrapper $result return: bool |
showRevision( $timestamp ) X-Ref |
No description |
showDiff( $previousRev, $currentRev ) X-Ref |
Build a diff display between this and the previous either deleted or non-deleted edit. param: Revision $previousRev param: Revision $currentRev return: string HTML |
diffHeader( $rev, $prefix ) X-Ref |
param: Revision $rev param: string $prefix return: string |
showFileConfirmationForm( $key ) X-Ref |
Show a form confirming whether a tokenless user really wants to see a file param: string $key |
showFile( $key ) X-Ref |
Show a deleted file version requested by the visitor. param: string $key |
showHistory() X-Ref |
No description |
formatRevisionRow( $row, $earliestLiveTime, $remaining ) X-Ref |
No description |
formatFileRow( $row ) X-Ref |
No description |
getPageLink( $rev, $titleObj, $ts ) X-Ref |
Fetch revision text link if it's available to all users param: Revision $rev param: Title $titleObj param: string $ts Timestamp return: string |
getFileLink( $file, $titleObj, $ts, $key ) X-Ref |
Fetch image view link if it's available to all users param: File|ArchivedFile $file param: Title $titleObj param: string $ts A timestamp param: string $key A storage key return: string HTML fragment |
getFileUser( $file ) X-Ref |
Fetch file's user id if it's available to this user param: File|ArchivedFile $file return: string HTML fragment |
getFileComment( $file ) X-Ref |
Fetch file upload comment if it's available to this user param: File|ArchivedFile $file return: string HTML fragment |
undelete() X-Ref |
No description |
getGroupName() X-Ref |
No description |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |