Skip to content

Commit

Permalink
dev/core#2073 Fix use of legacy leaky method in tested code
Browse files Browse the repository at this point in the history
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
  • Loading branch information
eileenmcnaughton committed Oct 7, 2020
1 parent 97240a7 commit c2ddacb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions CRM/Contact/Import/Form/MapField.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,9 @@ public function preProcess() {
}
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);
$columnsResult = CRM_Core_DAO::executeQuery($columnsQuery);
while ($row = $columnsResult->fetchRow(DB_FETCHMODE_ASSOC)) {
$columnNames[] = $row['Field'];
}
Expand Down

0 comments on commit c2ddacb

Please sign in to comment.