* @ingroup FileAbstraction
*/
+use MediaWiki\MediaWikiServices;
use Wikimedia\Rdbms\IDatabase;
/**
/** @var IDatabase */
protected $db;
+ /** @var string */
+ protected $oldHash;
+
+ /** @var string */
+ protected $newHash;
+
+ /** @var string */
+ protected $oldName;
+
+ /** @var string */
+ protected $newName;
+
+ /** @var string */
+ protected $oldRel;
+
+ /** @var string */
+ protected $newRel;
+
/**
* @param File $file
* @param Title $target
public function execute() {
$repo = $this->file->repo;
$status = $repo->newGood();
- $destFile = wfLocalFile( $this->target );
+ $destFile = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
+ ->newFile( $this->target );
$this->file->lock();
$destFile->lock(); // quickly fail if destination is not available