From: Seamus Lee Date: Tue, 21 Jun 2016 06:53:10 +0000 (+1000) Subject: Fix upgrate script with date issue following testing X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e6a2c901ef25b99b4709ffff20bd9ebccd8b3ce2;p=civicrm-core.git Fix upgrate script with date issue following testing --- diff --git a/CRM/Upgrade/Incremental/php/FourSeven.php b/CRM/Upgrade/Incremental/php/FourSeven.php index 4068e314b3..69005132e3 100644 --- a/CRM/Upgrade/Incremental/php/FourSeven.php +++ b/CRM/Upgrade/Incremental/php/FourSeven.php @@ -268,14 +268,13 @@ class CRM_Upgrade_Incremental_php_FourSeven extends CRM_Upgrade_Incremental_Base AND value is not NULL'); CRM_Core_DAO::executeQuery('DELETE FROM civicrm_setting WHERE name = "activity_tab_filter"'); - + $date = CRM_Utils_Time::getTime('Y-m-d H:i:s'); CRM_Core_DAO::executeQuery('ALTER TABLE civicrm_setting ADD UNIQUE INDEX index_domain_contact_name (domain_id, contact_id, name)'); - CRM_Core_DAO::executeQuery('INSERT INTO civicrm_setting (name, contact_id, domain_id, value, is_domain, created_id, created_date) - SELECT name, contact_id, domain_id, value, 0, contact_id, %1 + CRM_Core_DAO::executeQuery("INSERT INTO civicrm_setting (name, contact_id, domain_id, value, is_domain, created_id, created_date) + SELECT name, contact_id, domain_id, value, 0, contact_id,'$date' FROM civicrm_activity_setting - WHERE name = "activity_tab_filter" - AND value is not NULL', array( - 1 => CRM_Utils_Time::getTime('Y-m-d H:i:s'), + WHERE name = 'activity_tab_filter' + AND value is not NULL" ); CRM_Core_DAO::executeQuery('DROP TABLE civicrm_activity_setting');