CRM-14419 - e-notice on activity.getcount when contact_id is not passed in
authorEileen McNaughton <eileen@fuzion.co.nz>
Thu, 3 Apr 2014 08:13:06 +0000 (21:13 +1300)
committerEileen McNaughton <eileen@fuzion.co.nz>
Thu, 3 Apr 2014 12:26:03 +0000 (01:26 +1300)
api/v3/Activity.php

index 171e20a53933df48b6c652cc9733bcb94622dddb..6769575609da7f5d989d2c3554629990152ae997 100644 (file)
@@ -232,6 +232,10 @@ function civicrm_api3_activity_get($params) {
   else {
     $activities = _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, FALSE);
   }
+  $options = _civicrm_api3_get_options_from_params($params, FALSE,'activity','get');
+  if($options['is_count']) {
+    return civicrm_api3_create_success($activities, $params, 'activity', 'get');
+  }
 
   $activities = _civicrm_api3_activity_get_formatResult($params, $activities);
   //legacy custom data get - so previous formatted response is still returned too