From: eileen Date: Thu, 22 Aug 2013 23:50:42 +0000 (+1200) Subject: CRM-13179 fix country autofill X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=45c30250131052d1f0848e7aac4bc21649affc59;p=civicrm-core.git CRM-13179 fix country autofill --- diff --git a/api/v3/Profile.php b/api/v3/Profile.php index 7c41d54d96..a7196eeb10 100644 --- a/api/v3/Profile.php +++ b/api/v3/Profile.php @@ -386,7 +386,7 @@ function _civicrm_api3_profile_getbillingpseudoprofile(&$params) { 'api.address.get.2' => array('is_billing' => True, 'return' => $addressFields), 'api.email.get.1' => array('location_type_id' => 'Billing',), 'api.email.get.2' => array('is_billing' => True,), - 'return' => 'api.email.get, api.address.get, api.address.getoptions, state_province, email, first_name, last_name, middle_name, ' . implode($addressFields, ','), + 'return' => 'api.email.get, api.address.get, api.address.getoptions, country, state_province, email, first_name, last_name, middle_name, ' . implode($addressFields, ','), ) ); diff --git a/api/v3/examples/ProfileGet.php b/api/v3/examples/ProfileGet.php index ad458c86c7..a390666000 100644 --- a/api/v3/examples/ProfileGet.php +++ b/api/v3/examples/ProfileGet.php @@ -62,7 +62,7 @@ function profile_get_expectedresult(){ 'billing_street_address-5' => '5 Saint Helier St', 'billing_city-5' => 'Gotham City', 'billing_state_province_id-5' => '1021', - 'billing_country_id-5' => '', + 'billing_country_id-5' => '1228', 'billing_postal_code-5' => '90210', 'billing-email-5' => 'abc1.xyz1@yahoo.com', 'email-5' => 'abc1.xyz1@yahoo.com', diff --git a/tests/phpunit/api/v3/ProfileTest.php b/tests/phpunit/api/v3/ProfileTest.php index 01d9fb179f..b2e699e015 100644 --- a/tests/phpunit/api/v3/ProfileTest.php +++ b/tests/phpunit/api/v3/ProfileTest.php @@ -131,7 +131,7 @@ class api_v3_ProfileTest extends CiviUnitTestCase { 'billing_street_address-5' => '5 Saint Helier St', 'billing_city-5' => 'Gotham City', 'billing_state_province_id-5' => '1021', - 'billing_country_id-5' => '', + 'billing_country_id-5' => '1228', 'billing-email-5' => 'abc1.xyz1@yahoo.com', 'billing_postal_code-5' => '90210', 'billing-email-5' => 'abc1.xyz1@yahoo.com',