Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
92c61141
Commit
92c61141
authored
Jan 25, 2017
by
Nathaniel Catchpole
Browse files
Issue
#2829274
by mr.baileys: Upload-field not migrated if not explicitly enabled on D6
parent
cf2b9be6
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/modules/file/src/Plugin/migrate/source/d6/UploadInstance.php
View file @
92c61141
...
...
@@ -38,13 +38,13 @@ protected function initializeIterator() {
->
fetchAllKeyed
();
foreach
(
$node_types
as
$node_type
)
{
$name
=
'upload_'
.
$node_type
;
if
(
isset
(
$values
[
$name
]))
{
$enabled
=
unserialize
(
$values
[
$name
]);
if
(
$enabled
)
{
$return
[
$node_type
][
'node_type'
]
=
$node_type
;
$return
[
$node_type
][
'
max_filesize'
]
=
$max_filesiz
e
;
$return
[
$node_type
][
'
file_extensions'
]
=
$file_extensions
;
}
// By default, file attachments in D6 are enabled unless upload_<type> is
// false, so include types where the upload-variable is not set.
$enabled
=
!
isset
(
$values
[
$name
])
||
unserialize
(
$values
[
$name
]);
if
(
$enabled
)
{
$return
[
$node_type
][
'
node_type'
]
=
$node_typ
e
;
$return
[
$node_type
][
'
max_filesize'
]
=
$max_filesize
;
$return
[
$node_type
][
'file_extensions'
]
=
$file_extensions
;
}
}
...
...
core/modules/migrate_drupal/tests/fixtures/drupal6.php
View file @
92c61141
...
...
@@ -45954,8 +45954,32 @@
'value' => 's:1:"1";',
))
->values(array(
'name' => 'upload_page',
'value' => 'b:1;',
'name' => 'upload_employee',
'value' => 'b:0;',
))
->values(array(
'name' => 'upload_event',
'value' => 'b:0;',
))
->values(array(
'name' => 'upload_sponsor',
'value' => 'b:0;',
))
->values(array(
'name' => 'upload_test_page',
'value' => 'b:0;',
))
->values(array(
'name' => 'upload_test_event',
'value' => 'b:0;',
))
->values(array(
'name' => 'upload_test_planet',
'value' => 'b:0;',
))
->values(array(
'name' => 'upload_test_story',
'value' => 'b:0;',
))
->values(array(
'name' => 'upload_story',
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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