Unverified Commit f9791ee8 authored by Edsel Roque Lopez's avatar Edsel Roque Lopez Committed by GitHub
parent 8e9ec058
......@@ -1070,4 +1070,27 @@ function grantprograms_civicrm_links( $op, $objectName, $objectId, &$links ) {
'title' => ts('Grant Program'),
'ref' => 'new-grant program');
}
}
\ No newline at end of file
}
/**
* Implements hook_civicrm_merge().
* Move grant payments to new contact.
*
* @param $type
* @param $data
* @param null $mainId
* @param null $otherId
* @param null $tables
*/
function grantprograms_civicrm_merge($type, &$data, $mainId = NULL, $otherId = NULL, $tables = NULL) {
if ($type == 'cidRefs') {
global $db_url;
if (!empty($db_url)) {
$db_default = is_array($db_url) ? $db_url['default'] : $db_url;
$db_default = ltrim(parse_url($db_default, PHP_URL_PATH), '/');
} else {
$db_default = '';
}
$data[$db_default . 'civicrm_payment'] = array('contact_id');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment