jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/394223 )
Change subject: Add API parameter for fix_address
......................................................................
Add API parameter for fix_address
Change-Id: I4b59b1b1518b8f7ed24804a001d9d0fb31381b79
---
M api/v3/Address.php
1 file changed, 10 insertions(+), 1 deletion(-)
Approvals:
jenkins-bot: Verified
Eileen: Looks good to me, approved
diff --git a/api/v3/Address.php b/api/v3/Address.php
index a7ec8cb..4a919c9 100644
--- a/api/v3/Address.php
+++ b/api/v3/Address.php
@@ -76,11 +76,15 @@
$params['check_permissions'] = 0;
}
+ if (!isset($params['fix_address'])) {
+ $params['fix_address'] = TRUE;
+ }
+
/**
* Create array for BAO (expects address params in as an
* element in array 'address'
*/
- $addressBAO = CRM_Core_BAO_Address::add($params, TRUE);
+ $addressBAO = CRM_Core_BAO_Address::add($params, $params['fix_address']);
if (empty($addressBAO)) {
return civicrm_api3_create_error("Address is not created or updated ");
}
@@ -110,6 +114,11 @@
at once, the job \'Geocode and Parse Addresses\' can execute this task
after the import)',
'type' => CRM_Utils_Type::T_BOOLEAN,
);
+ $params['fix_address'] = array(
+ 'title' => 'Fix address',
+ 'description' => 'When true, apply various fixes to the address before
insert. Default true.',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ );
$params['world_region'] = array(
'title' => ts('World Region'),
'name' => 'world_region',
--
To view, visit https://gerrit.wikimedia.org/r/394223
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4b59b1b1518b8f7ed24804a001d9d0fb31381b79
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: Eileen <[email protected]>
Gerrit-Reviewer: Mepps <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits