Skip to content

Instantly share code, notes, and snippets.

@lcdservices
lcdservices / gist:f1ca7018479a6b99261e03e8c4bf432b
Created April 22, 2019 22:53
fix merge custom file fields
--- C:/Users/Brian/Documents/CLIENT/sites/all/modules/civicrm/CRM/Dedupe/Merger.php Mon Apr 22 17:11:24 2019
+++ C:/Users/Brian/Documents/CLIENT/sites/all/civicustom/php/CRM/Dedupe/Merger.php Mon Apr 22 17:36:01 2019
@@ -494,19 +494,18 @@
$mainId = (int) $mainId;
$otherId = (int) $otherId;
$multi_value_tables = array_keys(CRM_Dedupe_Merger::getMultiValueCustomSets('cidRefs'));
$sqls = array();
foreach ($affected as $table) {
@lcdservices
lcdservices / gist:af828079c676c761b54ea6b9d4f953bf
Created April 12, 2019 16:55
updateMultiRecordValuesWithLatest
public static function updateMultiRecordValuesWithLatest($gid, $cid, $fields, &$values) {
CRM_Core_Error::debug_var('4907 $gid', $gid, TRUE, TRUE, '4907');
CRM_Core_Error::debug_var('4907 $cid', $cid, TRUE, TRUE, '4907');
CRM_Core_Error::debug_var('4907 $fields', $fields, TRUE, TRUE, '4907');
CRM_Core_Error::debug_var('4907 $values', $values, TRUE, TRUE, '4907');
$updated = FALSE;
if (CRM_Core_BAO_UFField::checkMultiRecordFieldExists($gid)) {
// to make sure we get the latest record set the limit 1 and order by id desc
$DTparams = array(
diff --git a/media/civicrm/ext/biz.jmaconsulting.ode/ode.php b/media/civicrm/ext/biz.jmaconsulting.ode/ode.php
index 2f02955..a8ce61b 100644
--- a/media/civicrm/ext/biz.jmaconsulting.ode/ode.php
+++ b/media/civicrm/ext/biz.jmaconsulting.ode/ode.php
@@ -165,6 +165,11 @@ function toCheckEmail($email, $field, $returnHostName = FALSE) {
return $host;
}
+ //LCD check FROM email addresses
+ if (isFromEmail($email)) {