Merge pull request #2514 from colemanw/ac2
[civicrm-core.git] / api / v3 / Address.php
index 1cad60f408822250449158075b9cb9e76149bac5..bff434e2ccbe29c8888c517a39530c2065191013 100644 (file)
@@ -1,9 +1,8 @@
 <?php
-// $Id$
 
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -37,8 +36,6 @@
  * @version $Id: Address.php 2011-02-16 ErikHommel $
  */
 
-require_once 'CRM/Core/BAO/Address.php';
-
 /**
  *  Add an Address for a contact
  *
@@ -103,6 +100,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',
+  );
 }
 
 /**