Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
229
Merge Requests
229
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
c61a9d4b
Unverified
Commit
c61a9d4b
authored
Jan 02, 2021
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#3189878
by Matroskeen: Remove temporaryPath property from d7/File source plugin
parent
118b1c33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
core/modules/file/src/Plugin/migrate/source/d7/File.php
core/modules/file/src/Plugin/migrate/source/d7/File.php
+1
-9
No files found.
core/modules/file/src/Plugin/migrate/source/d7/File.php
View file @
c61a9d4b
...
...
@@ -29,13 +29,6 @@ class File extends DrupalSqlBase {
*/
protected
$privatePath
;
/**
* The temporary file directory path.
*
* @var string
*/
protected
$temporaryPath
;
/**
* {@inheritdoc}
*/
...
...
@@ -73,7 +66,6 @@ public function query() {
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 @@ protected function initializeIterator() {
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
->
temporary
Path
],
$row
->
getSourceProperty
(
'uri'
));
$path
=
str_replace
([
'public:/'
,
'private:/'
],
[
$this
->
publicPath
,
$this
->
private
Path
],
$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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment