* @ingroup RevisionDelete
*/
+use Wikimedia\Rdbms\IDatabase;
+
/**
* List for oldimage table items
*/
* @return mixed
*/
public function doQuery( $db ) {
- $archiveNames = array();
+ $archiveNames = [];
foreach ( $this->ids as $timestamp ) {
$archiveNames[] = $timestamp . '!' . $this->title->getDBkey();
}
+ $oiQuery = OldLocalFile::getQueryInfo();
return $db->select(
- 'oldimage',
- OldLocalFile::selectFields(),
- array(
+ $oiQuery['tables'],
+ $oiQuery['fields'],
+ [
'oi_name' => $this->title->getDBkey(),
'oi_archive_name' => $archiveNames
- ),
+ ],
__METHOD__,
- array( 'ORDER BY' => 'oi_timestamp DESC' )
+ [ 'ORDER BY' => 'oi_timestamp DESC' ],
+ $oiQuery['joins']
);
}
}
public function clearFileOps() {
- $this->deleteBatch = array();
- $this->storeBatch = array();
- $this->cleanupBatch = array();
+ $this->deleteBatch = [];
+ $this->storeBatch = [];
+ $this->cleanupBatch = [];
}
public function doPreCommitUpdates() {
return $status;
}
- public function doPostCommitUpdates() {
+ public function doPostCommitUpdates( array $visibilityChangeMap ) {
$file = wfLocalFile( $this->title );
$file->purgeCache();
$file->purgeDescription();
// Purge full images from cache
- $purgeUrls = array();
+ $purgeUrls = [];
foreach ( $this->ids as $timestamp ) {
$archiveName = $timestamp . '!' . $this->title->getDBkey();
$file->purgeOldThumbnails( $archiveName );