Issue #3189878 by Matroskeen: Remove temporaryPath property from d7/File source plugin

merge-requests/202/head
Alex Pott 2021-01-02 21:19:49 +00:00
parent 118b1c33a7
commit c61a9d4bc9
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
1 changed files with 1 additions and 9 deletions

View File

@ -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.