Merge "FauxRequest: don’t override getValues()"
[lhc/web/wiklou.git] / includes / filerepo / file / LocalFileMoveBatch.php
index 5594004..0cdc2d5 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup FileAbstraction
  */
 
+use MediaWiki\MediaWikiServices;
 use Wikimedia\Rdbms\IDatabase;
 
 /**
@@ -45,6 +46,24 @@ class LocalFileMoveBatch {
        /** @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
@@ -125,7 +144,8 @@ class LocalFileMoveBatch {
        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