33 private $htmlCacheUpdater;
63 parent::__construct( $context,
$page,
$ids, $lbFactory );
64 $this->htmlCacheUpdater = $htmlCacheUpdater;
65 $this->repoGroup = $repoGroup;
73 return 'oi_archive_name';
77 return 'deleterevision';
90 foreach ( $this->ids as $timestamp ) {
91 $archiveNames[] = $timestamp .
'!' . $this->page->getDBkey();
99 'oi_name' => $this->page->getDBkey(),
100 'oi_archive_name' => $archiveNames
103 [
'ORDER BY' =>
'oi_timestamp DESC' ],
113 $this->deleteBatch = [];
114 $this->storeBatch = [];
115 $this->cleanupBatch = [];
120 $repo = $this->repoGroup->getLocalRepo();
121 if ( $this->storeBatch ) {
124 if ( !$status->isOK() ) {
127 if ( $this->deleteBatch ) {
128 $status->merge( $repo->deleteBatch( $this->deleteBatch ) );
130 if ( !$status->isOK() ) {
135 if ( $this->cleanupBatch ) {
136 $status->merge( $repo->cleanupDeletedBatch( $this->cleanupBatch ) );
143 $file = $this->repoGroup->getLocalRepo()->newFile( $this->page );
145 $file->purgeDescription();
149 foreach ( $this->ids as $timestamp ) {
150 $archiveName = $timestamp .
'!' . $this->page->getDBkey();
151 $file->purgeOldThumbnails( $archiveName );
152 $purgeUrls[] =
$file->getArchiveUrl( $archiveName );
155 $this->htmlCacheUpdater->purgeUrls(
157 HtmlCacheUpdater::PURGE_INTENT_TXROUND_REFLECTED
Class to invalidate the CDN and HTMLFileCache entries associated with URLs/titles.
static getQueryInfo(array $options=[])
Return the tables, fields, and join conditions to be selected to create a new oldlocalfile object.
Prioritized list of file repositories.
Item class for an oldimage table row.
List for oldimage table items.
getSuppressBit()
Get the integer value of the flag used for suppression.
__construct(IContextSource $context, PageIdentity $page, array $ids, LBFactory $lbFactory, HtmlCacheUpdater $htmlCacheUpdater, RepoGroup $repoGroup)
static getRelationType()
Get the DB field name associated with the ID list.
doPostCommitUpdates(array $visibilityChangeMap)
A hook for setVisibility(): do any necessary updates post-commit.
doPreCommitUpdates()
A hook for setVisibility(): do batch updates pre-commit.
clearFileOps()
Clear any data structures needed for doPreCommitUpdates() and doPostCommitUpdates() STUB.
newItem( $row)
Create an item object from a DB result row.
getType()
Get the internal type name of this list.
static getRevdelConstant()
Get the revision deletion constant for this list type Override this function.
static getRestriction()
Get the user right required for this list type Override this function.
static newGood( $value=null)
Factory function for good results.
Interface for objects which can provide a MediaWiki context on request.
Interface for objects (potentially) representing an editable wiki page.
if(PHP_SAPI !='cli-server') if(!isset( $_SERVER['SCRIPT_FILENAME'])) $file
Item class for a filearchive table row.