X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCase%2FBAO%2FCase.php;h=f947784c068b93e06a4bf0c76b162afacf7ae44a;hb=5e33479d95cd5eb54bced614c42bcac7be6ad15f;hp=1b1340a9ef17c30887344fdd688c2977471c8621;hpb=110cb51eb92825e97fd8dde352ef20ea0be26f5b;p=civicrm-core.git diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index 1b1340a9ef..f947784c06 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -2084,28 +2084,6 @@ HERESQL; continue; } - // CRM-11662 Copy Case custom data - $extends = array('case'); - $groupTree = CRM_Core_BAO_CustomGroup::getGroupDetail(NULL, NULL, $extends); - if ($groupTree) { - foreach ($groupTree as $groupID => $group) { - $table[$groupTree[$groupID]['table_name']] = array('entity_id'); - foreach ($group['fields'] as $fieldID => $field) { - $table[$groupTree[$groupID]['table_name']][] = $groupTree[$groupID]['fields'][$fieldID]['column_name']; - } - } - - foreach ($table as $tableName => $tableColumns) { - $insert = 'INSERT INTO ' . $tableName . ' (' . implode(', ', $tableColumns) . ') '; - $tableColumns[0] = $mainCaseId; - $select = 'SELECT ' . implode(', ', $tableColumns); - $from = ' FROM ' . $tableName; - $where = " WHERE {$tableName}.entity_id = {$otherCaseId}"; - $query = $insert . $select . $from . $where; - $dao = CRM_Core_DAO::executeQuery($query); - } - } - $mainCaseIds[] = $mainCaseId; //insert record for case contact. $otherCaseContact = new CRM_Case_DAO_CaseContact();