From c78f866ee1bcacd88801275c9a8ada9119e2b558 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 14 Jun 2018 16:18:16 -0700 Subject: [PATCH] (dev/core#183) Change temp table naming for search-tasks Testing notes - This is a pretty formulaic change. The main concern is some kind of typo or bad table name causing a hard-fail. To control that risk, we just run the code in a facile way: * Perform a contact search * Pick some contacts * Export them We do this procedure under a few circumstances: * With the original code * With a purposefully bad edit (provoking an expected error) * With the new code --- CRM/Contact/Form/Task.php | 2 +- CRM/Core/Config.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Task.php b/CRM/Contact/Form/Task.php index 5136641e3b..243422f771 100644 --- a/CRM/Contact/Form/Task.php +++ b/CRM/Contact/Form/Task.php @@ -150,7 +150,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { $form->assign('taskName', CRM_Utils_Array::value($form->_task, $crmContactTaskTasks)); if ($useTable) { - $form->_componentTable = CRM_Core_DAO::createTempTableName('civicrm_task_action', TRUE, $qfKey); + $form->_componentTable = CRM_Utils_SQL_TempTable::build()->setCategory('tskact')->setDurable()->setId($qfKey)->getName(); $sql = " DROP TABLE IF EXISTS {$form->_componentTable}"; CRM_Core_DAO::executeQuery($sql); diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index a1b3eb7f30..c4517d6ca2 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -390,7 +390,6 @@ class CRM_Core_Config extends CRM_Core_Config_MagicMerge { AND ( TABLE_NAME LIKE 'civicrm_import_job_%' OR TABLE_NAME LIKE 'civicrm_export_temp%' - OR TABLE_NAME LIKE 'civicrm_task_action_temp%' OR TABLE_NAME LIKE 'civicrm_report_temp%' OR TABLE_NAME LIKE 'civicrm_tmp_d%' ) -- 2.25.1