MediaWiki REL1_39
|
Backend logic for performing a page undelete action. More...
Public Member Functions | |
__construct (HookContainer $hookContainer, JobQueueGroup $jobQueueGroup, ILoadBalancer $loadBalancer, ReadOnlyMode $readOnlyMode, RepoGroup $repoGroup, LoggerInterface $logger, RevisionStore $revisionStore, WikiPageFactory $wikiPageFactory, PageUpdaterFactory $pageUpdaterFactory, IContentHandlerFactory $contentHandlerFactory, ArchivedRevisionLookup $archivedRevisionLookup, NamespaceInfo $namespaceInfo, ITextFormatter $contLangMsgTextFormatter, ProperPageIdentity $page, Authority $performer) | |
canProbablyUndeleteAssociatedTalk () | |
Tests whether it's probably possible to undelete the associated talk page. | |
getFileStatus () | |
getRevisionStatus () | |
setTags (array $tags) | |
Change tags to add to log entry (the user should be able to add the specified tags before this is called) | |
setUndeleteAssociatedTalk (bool $undelete) | |
Whether to delete the associated talk page with the subject page. | |
setUndeleteOnlyFileVersions (array $fileVersions) | |
If you don't want to undelete all file versions, pass an array of versions to undelete. | |
setUndeleteOnlyTimestamps (array $timestamps) | |
If you don't want to undelete all revisions, pass an array of timestamps to undelete. | |
setUnsuppress (bool $unsuppress) | |
Whether to remove all ar_deleted/fa_deleted restrictions of selected revs. | |
undeleteIfAllowed (string $comment) | |
Same as undeleteUnsafe, but checks permissions. | |
undeleteUnsafe (string $comment) | |
Restore the given (or all) text and file revisions for the page. | |
Public Attributes | |
const | FILES_RESTORED = 'files' |
const | REVISIONS_RESTORED = 'revs' |
Backend logic for performing a page undelete action.
Definition at line 57 of file UndeletePage.php.
MediaWiki\Page\UndeletePage::__construct | ( | HookContainer | $hookContainer, |
JobQueueGroup | $jobQueueGroup, | ||
ILoadBalancer | $loadBalancer, | ||
ReadOnlyMode | $readOnlyMode, | ||
RepoGroup | $repoGroup, | ||
LoggerInterface | $logger, | ||
RevisionStore | $revisionStore, | ||
WikiPageFactory | $wikiPageFactory, | ||
PageUpdaterFactory | $pageUpdaterFactory, | ||
IContentHandlerFactory | $contentHandlerFactory, | ||
ArchivedRevisionLookup | $archivedRevisionLookup, | ||
NamespaceInfo | $namespaceInfo, | ||
ITextFormatter | $contLangMsgTextFormatter, | ||
ProperPageIdentity | $page, | ||
Authority | $performer ) |
HookContainer | $hookContainer | |
JobQueueGroup | $jobQueueGroup | |
ILoadBalancer | $loadBalancer | |
ReadOnlyMode | $readOnlyMode | |
RepoGroup | $repoGroup | |
LoggerInterface | $logger | |
RevisionStore | $revisionStore | |
WikiPageFactory | $wikiPageFactory | |
PageUpdaterFactory | $pageUpdaterFactory | |
IContentHandlerFactory | $contentHandlerFactory | |
ArchivedRevisionLookup | $archivedRevisionLookup | |
NamespaceInfo | $namespaceInfo | |
ITextFormatter | $contLangMsgTextFormatter | |
ProperPageIdentity | $page | |
Authority | $performer |
Definition at line 126 of file UndeletePage.php.
MediaWiki\Page\UndeletePage::canProbablyUndeleteAssociatedTalk | ( | ) |
Tests whether it's probably possible to undelete the associated talk page.
This checks the replica, so it may not see the latest master change, and is useful e.g. for building the UI.
Definition at line 211 of file UndeletePage.php.
MediaWiki\Page\UndeletePage::getFileStatus | ( | ) |
Definition at line 715 of file UndeletePage.php.
MediaWiki\Page\UndeletePage::getRevisionStatus | ( | ) |
Definition at line 723 of file UndeletePage.php.
MediaWiki\Page\UndeletePage::setTags | ( | array | $tags | ) |
Change tags to add to log entry (the user should be able to add the specified tags before this is called)
string[] | $tags |
Definition at line 178 of file UndeletePage.php.
MediaWiki\Page\UndeletePage::setUndeleteAssociatedTalk | ( | bool | $undelete | ) |
Whether to delete the associated talk page with the subject page.
bool | $undelete |
Definition at line 233 of file UndeletePage.php.
MediaWiki\Page\UndeletePage::setUndeleteOnlyFileVersions | ( | array | $fileVersions | ) |
If you don't want to undelete all file versions, pass an array of versions to undelete.
int[] | $fileVersions |
Definition at line 200 of file UndeletePage.php.
MediaWiki\Page\UndeletePage::setUndeleteOnlyTimestamps | ( | array | $timestamps | ) |
If you don't want to undelete all revisions, pass an array of timestamps to undelete.
string[] | $timestamps |
Definition at line 189 of file UndeletePage.php.
MediaWiki\Page\UndeletePage::setUnsuppress | ( | bool | $unsuppress | ) |
Whether to remove all ar_deleted/fa_deleted restrictions of selected revs.
bool | $unsuppress |
Definition at line 167 of file UndeletePage.php.
MediaWiki\Page\UndeletePage::undeleteIfAllowed | ( | string | $comment | ) |
Same as undeleteUnsafe, but checks permissions.
string | $comment |
Definition at line 253 of file UndeletePage.php.
MediaWiki\Page\UndeletePage::undeleteUnsafe | ( | string | $comment | ) |
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.
This also sets Status objects, $this->fileStatus and $this->revisionStatus (depending what operations are attempted).
string | $comment |
Definition at line 295 of file UndeletePage.php.
const MediaWiki\Page\UndeletePage::FILES_RESTORED = 'files' |
Definition at line 60 of file UndeletePage.php.
const MediaWiki\Page\UndeletePage::REVISIONS_RESTORED = 'revs' |
Definition at line 61 of file UndeletePage.php.