Merge pull request #1271 from deepak-srivastava/revisions
[civicrm-core.git] / api / v3 / PriceSet.php
index 19bc3678194bfeb5208b0f1e174cc503acc5d0a7..5423ee048726c1c9f78597c1a1b580c44f053c61 100644 (file)
@@ -84,6 +84,11 @@ function _civicrm_api3_price_set_create_spec(&$params) {
  * @access public
  */
 function civicrm_api3_price_set_get($params) {
+  // hack to make getcount work. - not sure the best approach here
+  // as creating an alternate getcount function also feels a bit hacky
+  if(isset($params['options'])  && isset($params['options']['is_count'])) {
+    return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
+  }
   $result = _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, FALSE);
   // Fetch associated entities
   foreach ($result as &$item) {