$label = $title->getPrefixedText();
}
$encLabel = htmlspecialchars( $label );
- $file = MediaWikiServices::getInstance()->getRepoGroup()->findFile( $title );
- $currentExists = $time ? ( $file != false ) : false;
+ $currentExists = $time
+ && MediaWikiServices::getInstance()->getRepoGroup()->findFile( $title ) !== false;
if ( ( $wgUploadMissingFileUrl || $wgUploadNavigationUrl || $wgEnableUploads )
&& !$currentExists
* @return Status
*/
function move( $target ) {
- $localRepo = MediaWikiServices::getInstance()->getRepoGroup();
+ $localRepo = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo();
if ( $this->getRepo()->getReadOnlyReason() !== false ) {
return $this->readOnlyFatalStatus();
}
wfDebugLog( 'imagemove', "Finished moving {$this->name}" );
// Purge the source and target files...
- $oldTitleFile = $localRepo->findFile( $this->title );
- $newTitleFile = $localRepo->findFile( $target );
+ $oldTitleFile = $localRepo->newFile( $this->title );
+ $newTitleFile = $localRepo->newFile( $target );
// To avoid slow purges in the transaction, move them outside...
DeferredUpdates::addUpdate(
new AutoCommitUpdate(