Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
drupal.org
field_collection
Commits
dc32e2ee
Commit
dc32e2ee
authored
Sep 03, 2019
by
Ra Mänd
Browse files
Coding standard fix.
parent
68a562d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
field_collection.install
field_collection.install
+7
-2
No files found.
field_collection.install
View file @
dc32e2ee
...
...
@@ -405,10 +405,15 @@ function field_collection_update_7008() {
*/
function
field_collection_update_7009
(
&
$sandbox
)
{
$items_per_pass
=
10
;
$field_collection_fields
=
field_read_fields
(
array
(
'type'
=>
'field_collection'
));
// If you don't have any field_collecton fields then skip this update.
if
(
empty
(
$field_collection_fields
))
{
return
;
}
if
(
!
isset
(
$sandbox
[
'current_field'
]))
{
$sandbox
[
'field_collection_fields'
]
=
array_keys
(
field_read_fields
(
array
(
'type'
=>
'field_collection'
)));
if
(
empty
(
$sandbox
[
'field_collection_fields'
]))
{
return
;
}
$sandbox
[
'field_collection_fields'
]
=
array_keys
(
$field_collection_fields
);
$sandbox
[
'current_field'
]
=
0
;
$sandbox
[
'current_field_collection_item'
]
=
0
;
$sandbox
[
'field_name'
]
=
$sandbox
[
'field_collection_fields'
][
$sandbox
[
'current_field'
]];
...
...
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