Skip to content
Snippets Groups Projects
Commit 4d1040bb authored by Deepak Srivastava's avatar Deepak Srivastava
Browse files

CRM-13028

----------------------------------------
* CRM-13028: Adv logging: Refine triggers for tables with datestamps
  http://issues.civicrm.org/jira/browse/CRM-13028
parent a6d16734
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,12 @@ class CRM_Logging_Schema {
'logging/contribute/summary',
);
//CRM-13028 / NYSS-6933 - table => array (cols) - to be excluded from the update statement
private $exceptions = array(
'civicrm_job' => array('last_run'),
'civicrm_group' => array('cache_date'),
);
/**
* Populate $this->tables and $this->logs with current db state.
*/
......@@ -403,7 +409,7 @@ COLS;
$cond = array( );
foreach ($columns as $column) {
// ignore modified_date changes
if ($column != 'modified_date') {
if ($column != 'modified_date' && !in_array($column, CRM_Utils_Array::value($table, $this->exceptions, array()))) {
$cond[] = "IFNULL(OLD.$column,'') <> IFNULL(NEW.$column,'')";
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment