X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FAddress.php;h=9d91da7bfac8aeb8262c3378a5d3626d21b0ca9c;hb=85bb0909cffd925f4cd5c0022a68a1ff74d3ad8e;hp=3ac7d5602380a8090413ff6b8d64739104120f8d;hpb=ce4fd42f89389d27c1ddd061b5ad2e92809ebe9a;p=civicrm-core.git diff --git a/api/v3/Address.php b/api/v3/Address.php index 3ac7d56023..9d91da7bfa 100644 --- a/api/v3/Address.php +++ b/api/v3/Address.php @@ -2,9 +2,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_Address * - * @copyright CiviCRM LLC (c) 2004-2013 + * @copyright CiviCRM LLC (c) 2004-2014 * @version $Id: Address.php 2011-02-16 ErikHommel $ */ @@ -43,6 +43,8 @@ * {@getfields address_create} * {@example AddressCreate.php} * + * @param $params + * * @return array of newly created tag property values. * @access public */ @@ -100,6 +102,21 @@ function _civicrm_api3_address_create_spec(&$params) { $params['contact_id']['api.required'] = 1; $params['country'] = array('title' => 'Name or 2-letter abbreviation of country. Looked up in civicrm_country table'); $params['street_parsing'] = array('title' => 'optional param to indicate you want the street_address field parsed into individual params'); + $params['world_region'] = array( + 'title' => ts('World Region'), + 'name' => 'world_region', + ); +} +/** + * Adjust Metadata for Get action + * + * @param array $params array or parameters determined by getfields + */ +function _civicrm_api3_address_get_spec(&$params) { + $params['world_region'] = array( + 'title' => ts('World Region'), + 'name' => 'world_region', + ); } /** @@ -110,10 +127,10 @@ function _civicrm_api3_address_create_spec(&$params) { * {@getfields address_delete} * {@example AddressDelete.php 0} * - * @return boolean | error true if successfull, error otherwise + * @return array api result array * @access public */ -function civicrm_api3_address_delete(&$params) { +function civicrm_api3_address_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); }