Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-04-04-00-08-28
[civicrm-core.git] / api / v3 / Activity.php
index 02d55fd78f26406bb483956563b0384ad4989897..88b2a7a274914b3b76bcea90830eb5f381914448 100644 (file)
@@ -3,9 +3,9 @@
 
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -32,7 +32,7 @@
  *
  * @package CiviCRM_APIv3
  * @subpackage API_Activity
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * @version $Id: Activity.php 30486 2010-11-02 16:12:09Z shot $
  *
  */
@@ -235,6 +235,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