Skip to content
Snippets Groups Projects
Commit 9478982f authored by eileen's avatar eileen
Browse files

#2073 Fix use of legacy leaky method in tested code

This is too low volume to really leak but it uses the leaky legacy method and
has test cover in

CRM_Contact_Import_Form_MapFieldTest.testSubmit with data set basic_data
CRM_Contact_Import_Form_MapFieldTest.testSubmit with data set save_mapping
parent 3bfdcfb5
Branches
Tags
No related merge requests found
......@@ -149,14 +149,11 @@ class CRM_Contact_Import_Form_MapField extends CRM_Import_Form_MapField {
}
else {
// get the field names from the temp. DB table
$dao = new CRM_Core_DAO();
$db = $dao->getDatabaseConnection();
$columnsQuery = "SHOW FIELDS FROM $this->_importTableName
WHERE Field NOT LIKE '\_%'";
$columnsResult = $db->query($columnsQuery);
while ($row = $columnsResult->fetchRow(DB_FETCHMODE_ASSOC)) {
$columnNames[] = $row['Field'];
$columnsResult = CRM_Core_DAO::executeQuery($columnsQuery);
while ($columnsResult->fetch()) {
$columnNames[] = $columnsResult->Field;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment