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
$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);
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%'
)