projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e286c5
)
Allow Participant roles to be specified as an array
author
Kirk Jackson
<kirk@caat.org.uk>
Mon, 2 Dec 2013 15:26:21 +0000
(15:26 +0000)
committer
Kirk Jackson
<kirk@caat.org.uk>
Mon, 2 Dec 2013 15:26:21 +0000
(15:26 +0000)
CRM/Event/BAO/Participant.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Event/BAO/Participant.php
b/CRM/Event/BAO/Participant.php
index 2f26fe66aaddbcdd9176e78fe07a36c13a71d5f7..14faa1aee44ad5e7d4005e1024d13b2e61ee0dd8 100644
(file)
--- a/
CRM/Event/BAO/Participant.php
+++ b/
CRM/Event/BAO/Participant.php
@@
-106,6
+106,11
@@
class CRM_Event_BAO_Participant extends CRM_Event_DAO_Participant {
$params['fee_amount'] = CRM_Utils_Rule::cleanMoney($params['fee_amount']);
}
+ // ensure that role ids are encoded as a string
+ if (is_array($params['role_id'])) {
+ $params['role_id'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, $params['role_id']);
+ }
+
$participantBAO = new CRM_Event_BAO_Participant;
if (CRM_Utils_Array::value('id', $params)) {
$participantBAO->id = CRM_Utils_Array::value('id', $params);