summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrewish2014-12-02 16:18:48 (GMT)
committerHoward Tyson2014-12-02 16:18:48 (GMT)
commite771b10a2e99a94221b68a3e5b486ba5c5a2b526 (patch)
tree81f510cc5457c1a76b93bea3ac82d8d031aa9bbe
parent63bc19fed8a2f68b60cbf20ce2728cf4e0b95257 (diff)
Issue #1440340 by tim.plunkett, drewish: WebformSubmissionsController::load() returns entities in incorrect order
-rw-r--r--webform_entity.module7
1 files changed, 6 insertions, 1 deletions
diff --git a/webform_entity.module b/webform_entity.module
index f377b2b..62bc8b0 100644
--- a/webform_entity.module
+++ b/webform_entity.module
@@ -533,7 +533,12 @@ class WebformSubmissionsController extends DrupalDefaultEntityController {
}
// TODO: Maybe figure out a way to prevent what is essentially a double load.
// We hook into the webform load op
- $submissions = webform_get_submissions($sids);
+ $fetched = webform_get_submissions($sids);
+ // Re-key the submissions so they're in the order requested.
+ $submissions = array();
+ foreach ($ids as $id) {
+ $submissions[$id] = isset($fetched[$id]) ? $fetched[$id] : NULL;
+ }
}
else {
$submissions = array();