From 4d1040bb5991bd943ec086a6a6eca9475f288062 Mon Sep 17 00:00:00 2001 From: Deepak Srivastava Date: Wed, 17 Jul 2013 13:50:35 +0530 Subject: [PATCH] CRM-13028 ---------------------------------------- * CRM-13028: Adv logging: Refine triggers for tables with datestamps http://issues.civicrm.org/jira/browse/CRM-13028 --- CRM/Logging/Schema.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php index dc02bb590e..3ebddca89d 100644 --- a/CRM/Logging/Schema.php +++ b/CRM/Logging/Schema.php @@ -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,'')"; } } -- 2.25.1