Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
paragraphs-3472388
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
paragraphs-3472388
Commits
b85441f4
Commit
b85441f4
authored
11 years ago
by
Jeroen Bobbeldijk
Browse files
Options
Downloads
Patches
Plain Diff
Fix for
#2142067
, thanks @xumepadismal
parent
14ea7fbc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
paragraphs.module
+9
-3
9 additions, 3 deletions
paragraphs.module
with
9 additions
and
3 deletions
paragraphs.module
+
9
−
3
View file @
b85441f4
...
...
@@ -1557,7 +1557,9 @@ function paragraphs_remove_submit($form, &$form_state) {
// the 3, the order of the two 3s now is undefined and may not match what
// the user had selected.
$input
=
drupal_array_get_nested_value
(
$form_state
[
'input'
],
$address
);
// Sort by weight
// Sort by weight,
// but first remove garbage values to ensure proper '_weight' sorting
unset
(
$input
[
'add_more'
]);
uasort
(
$input
,
'_field_sort_items_helper'
);
// Reweight everything in the correct order.
...
...
@@ -1646,7 +1648,9 @@ function paragraphs_deleteconfirm_submit($form, &$form_state) {
// the 3, the order of the two 3s now is undefined and may not match what
// the user had selected.
$input
=
drupal_array_get_nested_value
(
$form_state
[
'input'
],
$address
);
// Sort by weight
// Sort by weight,
// but first remove garbage values to ensure proper '_weight' sorting
unset
(
$input
[
'add_more'
]);
uasort
(
$input
,
'_field_sort_items_helper'
);
// Reweight everything in the correct order.
...
...
@@ -1695,7 +1699,9 @@ function paragraphs_restore_submit($form, &$form_state) {
// the 3, the order of the two 3s now is undefined and may not match what
// the user had selected.
$input
=
drupal_array_get_nested_value
(
$form_state
[
'input'
],
$address
);
// Sort by weight
// Sort by weight,
// but first remove garbage values to ensure proper '_weight' sorting
unset
(
$input
[
'add_more'
]);
uasort
(
$input
,
'_field_sort_items_helper'
);
// Reweight everything in the correct order.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment