projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert places where setters are used to set things
[civicrm-core.git]
/
api
/
v3
/
Phone.php
diff --git
a/api/v3/Phone.php
b/api/v3/Phone.php
index 0ce79c13697a83bd9a1c76ee5c73fc0207049e87..e5a4513d4b58bed1f50d96324265a606b854173c 100644
(file)
--- a/
api/v3/Phone.php
+++ b/
api/v3/Phone.php
@@
-3,7
+3,7
@@
+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
7
|
+ | Copyright CiviCRM LLC (c) 2004-201
9
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-56,6
+56,10
@@
function _civicrm_api3_phone_create_spec(&$params) {
$params['phone']['api.required'] = 1;
// hopefully change to use handleprimary
$params['is_primary']['api.default'] = 0;
$params['phone']['api.required'] = 1;
// hopefully change to use handleprimary
$params['is_primary']['api.default'] = 0;
+ $defaultLocation = CRM_Core_BAO_LocationType::getDefault();
+ if ($defaultLocation) {
+ $params['location_type_id']['api.default'] = $defaultLocation->id;
+ }
}
/**
}
/**