From 61d869af4903cacc590fc8f9f1124998e1fb600c Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 20 Jul 2014 14:36:20 +0100 Subject: [PATCH] Ensure 'extra' data gets loaded with EntityRef --- CRM/Core/Form/Renderer.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CRM/Core/Form/Renderer.php b/CRM/Core/Form/Renderer.php index d72ae72197..58273ad6a0 100644 --- a/CRM/Core/Form/Renderer.php +++ b/CRM/Core/Form/Renderer.php @@ -216,14 +216,13 @@ class CRM_Core_Form_Renderer extends HTML_QuickForm_Renderer_ArraySmarty { } if ($val) { $entity = $field->getAttribute('data-api-entity'); - $api = json_decode($field->getAttribute('data-api-params'), TRUE); - $params = CRM_Utils_Array::value('params', $api, array()); + $params = json_decode($field->getAttribute('data-api-params'), TRUE); // Support serialized values if (strpos($val, CRM_Core_DAO::VALUE_SEPARATOR) !== FALSE) { $val = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, ',', trim($val, CRM_Core_DAO::VALUE_SEPARATOR)); $field->setValue($val); } - $result = civicrm_api3($entity, 'getlist', array('id' => $val, 'params' => $params)); + $result = civicrm_api3($entity, 'getlist', array('id' => $val) + $params); if ($field->isFrozen()) { $field->removeAttribute('class'); } -- 2.25.1