update 7.1

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy
2012-12-08 11:59:44 +01:00
parent f276e09115
commit 4ef59776b0
14 changed files with 823 additions and 601 deletions

View File

@@ -110,7 +110,17 @@ class EntityReference_SelectionHandler_Views implements EntityReference_Selectio
// Get the results.
$result = $this->view->execute_display($display_name, $args);
}
return $result;
$return = array();
if ($result) {
$target_type = $this->field['settings']['target_type'];
$entities = entity_load($target_type, array_keys($result));
foreach($entities as $entity) {
list($id,, $bundle) = entity_extract_ids($target_type, $entity);
$return[$bundle][$id] = $result[$id];
}
}
return $return;
}
/**