Skip to content
Snippets Groups Projects
Unverified Commit 88786666 authored by Eileen McNaughton's avatar Eileen McNaughton Committed by GitHub
Browse files

Merge pull request #18699 from eileenmcnaughton/leak5

#2073 Fix use of legacy leaky method in tested code
parents 052958e3 9478982f
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