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:
1335f3a
)
Revert "CRM-21575 - Websites of same type are over-written"
author
Andrew Hunt
<andrew@aghstrategies.com>
Tue, 6 Feb 2018 02:00:08 +0000
(21:00 -0500)
committer
Andrew Hunt
<andrew@aghstrategies.com>
Tue, 6 Feb 2018 02:00:08 +0000
(21:00 -0500)
This reverts commit
dddcec4545602395fc865273175eb7227947cf74
.
CRM/Core/BAO/Website.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/BAO/Website.php
b/CRM/Core/BAO/Website.php
index 3094bf73cc4bdff612fbd45c57e61c50dc0f6528..96f91873d97885216ae764c8ea25b0cd7d79b502 100644
(file)
--- a/
CRM/Core/BAO/Website.php
+++ b/
CRM/Core/BAO/Website.php
@@
-73,7
+73,15
@@
class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
return FALSE;
}
+ $ids = self::allWebsites($contactID);
foreach ($params as $key => $values) {
+ if (empty($values['id']) && is_array($ids) && !empty($ids)) {
+ foreach ($ids as $id => $value) {
+ if (($value['website_type_id'] == $values['website_type_id'])) {
+ $values['id'] = $id;
+ }
+ }
+ }
if (!empty($values['url'])) {
$values['contact_id'] = $contactID;
self::add($values);