Merge pull request #6986 from saurabhbatra96/CRM-17120-function-caching-test
[civicrm-core.git] / api / v3 / Participant.php
index 84658072215d45fc3b2e46628b55889695948add..c1349ea4bb0a15e59167f230da1ed88882749087 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -163,6 +163,7 @@ function civicrm_api3_participant_get($params) {
 
   $participant = array();
   while ($dao->fetch()) {
+    $query->convertToPseudoNames($dao, FALSE, TRUE);
     $participant[$dao->participant_id] = $query->store($dao);
     //@todo - is this required - contribution & pledge use the same query but don't self-retrieve custom data
     _civicrm_api3_custom_data_get($participant[$dao->participant_id], 'Participant', $dao->participant_id, NULL);
@@ -180,8 +181,11 @@ function civicrm_api3_participant_get($params) {
  *   Array of parameters determined by getfields.
  */
 function _civicrm_api3_participant_get_spec(&$params) {
-  $params['participant_test']['api.default'] = 0;
-  $params['participant_test']['title'] = 'Get Test Participants';
+  $params['participant_test'] = array(
+    'api.default' => 0,
+    'title' => 'Get Test Participants',
+    'type' => CRM_Utils_Type::T_BOOLEAN,
+  );
 }
 
 /**