$logEntry->setPerformer( $user );
$logEntry->setTarget( $title );
$logEntry->setComment( $logComment );
- $logEntry->setTags( $tags );
+ $logEntry->addTags( $tags );
$logid = $logEntry->insert();
$logEntry->publish( $logid );
$logEntry->setPerformer( $user );
$logEntry->setTarget( clone $title );
$logEntry->setComment( $reason );
- $logEntry->setTags( $tags );
+ $logEntry->addTags( $tags );
$logid = $logEntry->insert();
$dbw->onTransactionPreCommitOrIdle(
function () use ( $logEntry, $logid ) {
);
$options = Xml::listDropDownOptionsOoui( $options );
+ $fields = [];
$fields[] = new OOUI\LabelWidget( [ 'label' => new OOUI\HtmlSnippet(
$this->prepareMessage( 'filedelete-intro' ) ) ]
);
$status = Status::newFatal( 'movepage-max-pages', $wgMaximumMovedPages );
$perTitleStatus[$oldSubpage->getPrefixedText()] = $status;
$topStatus->merge( $status );
- $topStatus->setOk( true );
+ $topStatus->setOK( true );
break;
}
}
$perTitleStatus[$oldSubpage->getPrefixedText()] = $status;
$topStatus->merge( $status );
- $topStatus->setOk( true );
+ $topStatus->setOK( true );
}
$topStatus->value = $perTitleStatus;
'4::oldtitle' => $this->oldTitle->getPrefixedText(),
] );
$logEntry->setRelations( [ 'pr_id' => $logRelationsValues ] );
- $logEntry->setTags( $changeTags );
+ $logEntry->addTags( $changeTags );
$logId = $logEntry->insert();
$logEntry->publish( $logId );
}
# Log the move
$logid = $logEntry->insert();
- $logEntry->setTags( $changeTags );
+ $logEntry->addTags( $changeTags );
$logEntry->publish( $logid );
return $nullRevision;
$this->loadFromDB( self::READ_NORMAL );
$fields = $this->getCacheFields( '' );
+ $cacheVal = [];
$cacheVal['fileExists'] = $this->fileExists;
if ( $this->fileExists ) {
foreach ( $fields as $field ) {
/**
* Delete cached transformed files for the current version only.
* @param array $options
+ * @phan-param array{forThumbRefresh?:bool} $options
*/
public function purgeThumbnails( $options = [] ) {
$files = $this->getThumbnails();
array_shift( $urls ); // don't purge directory
// Give media handler a chance to filter the file purge list
+ // @phan-suppress-next-line PhanTypeInvalidDimOffset
if ( !empty( $options['forThumbRefresh'] ) ) {
$handler = $this->getHandler();
if ( $handler ) {
# Add change tags, if any
if ( $tags ) {
- $logEntry->setTags( $tags );
+ $logEntry->addTags( $tags );
}
# Uploads can be patrolled
wfDebugLog( 'imagemove', "Finished moving {$this->name}" );
- // Purge the source and target files...
+ // Purge the source and target files outside the transaction...
$oldTitleFile = $localRepo->newFile( $this->title );
$newTitleFile = $localRepo->newFile( $target );
- // To avoid slow purges in the transaction, move them outside...
DeferredUpdates::addUpdate(
new AutoCommitUpdate(
$this->getRepo()->getMasterDB(),
function () use ( $oldTitleFile, $newTitleFile, $archiveNames ) {
$oldTitleFile->purgeEverything();
foreach ( $archiveNames as $archiveName ) {
+ /** @var OldLocalFile $oldTitleFile */
$oldTitleFile->purgeOldThumbnails( $archiveName );
}
$newTitleFile->purgeEverything();
// Now switch the object
$this->title = $target;
// Force regeneration of the name and hashpath
- unset( $this->name );
- unset( $this->hashPath );
+ $this->name = null;
+ $this->hashPath = null;
}
return $status;
*/
public $mLatest = false;
- /** @var PreparedEdit Map of cache fields (text, parser output, ect) for a proposed/new edit */
+ /**
+ * @var PreparedEdit|false Map of cache fields (text, parser output, ect) for a proposed/new edit
+ */
public $mPreparedEdit = false;
/**
if ( !is_null( $nullRevision ) ) {
$logEntry->setAssociatedRevId( $nullRevision->getId() );
}
- $logEntry->setTags( $tags );
+ $logEntry->addTags( $tags );
if ( $logRelationsField !== null && count( $logRelationsValues ) ) {
$logEntry->setRelations( [ $logRelationsField => $logRelationsValues ] );
}
$logEntry->setPerformer( $deleter );
$logEntry->setTarget( $logTitle );
$logEntry->setComment( $reason );
- $logEntry->setTags( $tags );
+ $logEntry->addTags( $tags );
$logid = $logEntry->insert();
$dbw->onTransactionPreCommitOrIdle(
private $mOriginalLogCallback = null;
private $mOriginalPageOutCallback = null;
private $mLogItemCount = 0;
+ private $mPageCount;
+ private $mIsUpload;
+ private $mInterwiki;
/**
* @param WikiImporter $importer
// Make sure the null revision will be tagged as well
$logEntry->setAssociatedRevId( $nullRevId );
if ( count( $this->logTags ) ) {
- $logEntry->setTags( $this->logTags );
+ $logEntry->addTags( $this->logTags );
}
$logid = $logEntry->insert();
$logEntry->publish( $logid );