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:
21d51f5
)
CRM-14062 all passing name to group API
author
Brian Shaughnessy
<brian@lcdservices.biz>
Thu, 9 Jan 2014 21:00:21 +0000
(16:00 -0500)
committer
Brian Shaughnessy
<brian@lcdservices.biz>
Thu, 9 Jan 2014 21:00:21 +0000
(16:00 -0500)
CRM/Contact/BAO/Group.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Contact/BAO/Group.php
b/CRM/Contact/BAO/Group.php
index 40439e0df86fc4b88f09eaf52a747eca32085fda..f086190c481a50ce38ef2d7aabb8847460d55d1b 100644
(file)
--- a/
CRM/Contact/BAO/Group.php
+++ b/
CRM/Contact/BAO/Group.php
@@
-389,7
+389,9
@@
class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
array_keys($group->parents)
) . CRM_Core_DAO::VALUE_SEPARATOR;
}
- if (!CRM_Utils_Array::value('id', $params)) {
+ if (!CRM_Utils_Array::value('id', $params) &&
+ !CRM_Utils_Array::value('name', $params)
+ ) {
$group->name .= "_tmp";
}
$group->save();
@@
-398,7
+400,9
@@
class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
return NULL;
}
- if (!CRM_Utils_Array::value('id', $params)) {
+ if (!CRM_Utils_Array::value('id', $params) &&
+ !CRM_Utils_Array::value('name', $params)
+ ) {
$group->name = substr($group->name, 0, -4) . "_{$group->id}";
}