X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=api%2Fv3%2FPriceSet.php;h=4e4b0aa5a6cdcc878c455b3b0752165b3a91006a;hb=85bb0909cffd925f4cd5c0022a68a1ff74d3ad8e;hp=19bc3678194bfeb5208b0f1e174cc503acc5d0a7;hpb=2f5ff37192635986fc82a3b46970121cf6688836;p=civicrm-core.git diff --git a/api/v3/PriceSet.php b/api/v3/PriceSet.php index 19bc367819..4e4b0aa5a6 100644 --- a/api/v3/PriceSet.php +++ b/api/v3/PriceSet.php @@ -2,9 +2,9 @@ /* /* +--------------------------------------------------------------------+ - | CiviCRM version 4.3 | + | CiviCRM version 4.5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2013 | + | Copyright CiviCRM LLC (c) 2004-2014 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -71,6 +71,7 @@ function civicrm_api3_price_set_create($params) { * @param array $params array or parameters determined by getfields */ function _civicrm_api3_price_set_create_spec(&$params) { + $params['title']['api.required'] = TRUE; } /** @@ -84,6 +85,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) {