From c61a9d4bc9b68223df66a6b2be76b829ebf53558 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Sat, 2 Jan 2021 21:19:49 +0000 Subject: [PATCH] Issue #3189878 by Matroskeen: Remove temporaryPath property from d7/File source plugin --- .../modules/file/src/Plugin/migrate/source/d7/File.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/core/modules/file/src/Plugin/migrate/source/d7/File.php b/core/modules/file/src/Plugin/migrate/source/d7/File.php index 7b2c48c99b1..cd285749e24 100644 --- a/core/modules/file/src/Plugin/migrate/source/d7/File.php +++ b/core/modules/file/src/Plugin/migrate/source/d7/File.php @@ -29,13 +29,6 @@ class File extends DrupalSqlBase { */ protected $privatePath; - /** - * The temporary file directory path. - * - * @var string - */ - protected $temporaryPath; - /** * {@inheritdoc} */ @@ -73,7 +66,6 @@ class File extends DrupalSqlBase { protected function initializeIterator() { $this->publicPath = $this->variableGet('file_public_path', 'sites/default/files'); $this->privatePath = $this->variableGet('file_private_path', NULL); - $this->temporaryPath = $this->variableGet('file_temporary_path', '/tmp'); return parent::initializeIterator(); } @@ -83,7 +75,7 @@ class File extends DrupalSqlBase { public function prepareRow(Row $row) { // Compute the filepath property, which is a physical representation of // the URI relative to the Drupal root. - $path = str_replace(['public:/', 'private:/', 'temporary:/'], [$this->publicPath, $this->privatePath, $this->temporaryPath], $row->getSourceProperty('uri')); + $path = str_replace(['public:/', 'private:/'], [$this->publicPath, $this->privatePath], $row->getSourceProperty('uri')); // At this point, $path could be an absolute path or a relative path, // depending on how the scheme's variable was set. So we need to shear out // the source_base_path in order to make them all relative.