Fix upgrate script with date issue following testing
authorSeamus Lee <seamuslee001@gmail.com>
Tue, 21 Jun 2016 06:53:10 +0000 (16:53 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Thu, 23 Jun 2016 03:27:20 +0000 (13:27 +1000)
CRM/Upgrade/Incremental/php/FourSeven.php

index 4068e314b366f5bc0559d57e64c9587a64aa77a5..69005132e3b61bfec244de87cae45b397bb524d5 100644 (file)
@@ -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');