Ensure 'extra' data gets loaded with EntityRef
authorColeman Watts <coleman@civicrm.org>
Sun, 20 Jul 2014 13:36:20 +0000 (14:36 +0100)
committerColeman Watts <coleman@civicrm.org>
Sun, 20 Jul 2014 13:36:20 +0000 (14:36 +0100)
CRM/Core/Form/Renderer.php

index d72ae721979132c28a5742253a7ec746d28616d3..58273ad6a07a2d154c4fd629a82b410591dd8e8f 100644 (file)
@@ -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');
       }