projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
e1fc171
4404e34
)
Merge pull request #3745 from colemanw/relMemberApi
author
colemanw
<coleman@civicrm.org>
Tue, 29 Jul 2014 13:08:20 +0000
(14:08 +0100)
committer
colemanw
<coleman@civicrm.org>
Tue, 29 Jul 2014 13:08:20 +0000
(14:08 +0100)
CRM-13652 - Fix relationship api to process related memberships
1
2
api/v3/Relationship.php
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
api/v3/Relationship.php
index 2dede0b650dcd0441033bf8ccb5d5e0ebb5c5931,9f47c56866b3cdaac7f599e06da1a5c575f6d965..72a1cd95d10ca24aa09182ff440a371348797a73
---
1
/
api/v3/Relationship.php
---
2
/
api/v3/Relationship.php
+++ b/
api/v3/Relationship.php
@@@
-55,9
-55,11
+55,11
@@@
function civicrm_api3_relationship_crea
$values = array();
_civicrm_api3_relationship_format_params($params, $values);
$ids = array();
+ $action = CRM_Core_Action::ADD;
- if (
CRM_Utils_Array::value('id', $params
)) {
+ if (
!empty($params['id']
)) {
$ids['contactTarget'] = $values['contact_id_b'];
+ $action = CRM_Core_Action::UPDATE;
}
$values['relationship_type_id'] = $values['relationship_type_id'] . '_a_b';