Commit 3f7d0c0f authored by ayduns's avatar ayduns

First round of '$dao->free()' removals

parent c08e3ee3
......@@ -396,7 +396,6 @@ WHERE cc.contact_id = %1 AND civicrm_case_type.name = '{$caseType}'";
$caseArray[] = $dao->id;
}
$dao->free();
return $caseArray;
}
......@@ -894,7 +893,6 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c
$values[$rid]['relationship_direction'] = $dao->relationship_direction;
}
$dao->free();
return $values;
}
......@@ -1218,7 +1216,6 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c
$caseActivities[$caseActivityId]['links'] = $url;
}
$dao->free();
$caseActivitiesDT = array();
$caseActivitiesDT['data'] = array_values($caseActivities);
......@@ -1318,7 +1315,6 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c
$values[] = $details;
}
}
$dao->free();
return $values;
}
......@@ -1802,7 +1798,6 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c
$values[$dao->id]['id'] = $dao->id;
$values[$dao->id]['activity_date'] = $dao->activity_date;
}
$dao->free();
return $values;
}
......@@ -2007,7 +2002,6 @@ SELECT civicrm_contact.id as casemanager_id,
while ($dao->fetch()) {
$relatedCaseIds[$dao->case_id] = $dao->case_id;
}
$dao->free();
return array_values($relatedCaseIds);
}
......@@ -2080,7 +2074,6 @@ SELECT civicrm_contact.id as casemanager_id,
'links' => $caseView,
);
}
$dao->free();
return $relatedCases;
}
......@@ -2254,7 +2247,6 @@ SELECT id
while ($dao->fetch()) {
$singletonActivityIds[] = $dao->id;
}
$dao->free();
}
}
......
......@@ -2553,7 +2553,6 @@ LEFT JOIN civicrm_email ON ( civicrm_contact.id = civicrm_email.contact_id )
if ($dao->fetch()) {
$email = $dao->email;
}
$dao->free();
return $email;
}
......@@ -2581,7 +2580,6 @@ AND civicrm_openid.is_primary = 1";
if ($dao->fetch()) {
$openId = $dao->openid;
}
$dao->free();
return $openId;
}
......@@ -3559,7 +3557,6 @@ LEFT JOIN civicrm_address ON ( civicrm_address.contact_id = civicrm_contact.id )
$dao->save();
}
}
$dao->free();
}
CRM_Utils_Hook::post('delete', $type, $id, $obj);
$obj->free();
......
......@@ -4525,7 +4525,6 @@ civicrm_relationship.start_date > {$today}
while ($dao->fetch()) {
if ($count) {
$noRows = $dao->rowCount;
$dao->free();
return array($noRows, NULL);
}
$val = $query->store($dao);
......@@ -4536,7 +4535,6 @@ civicrm_relationship.start_date > {$today}
}
$values[$dao->$entityIDField] = $val;
}
$dao->free();
return array($values, $options);
}
......@@ -4941,7 +4939,6 @@ civicrm_relationship.start_date > {$today}
while ($dao->fetch()) {
$ids[] = $dao->id;
}
$dao->free();
return implode(',', $ids);
}
......
......@@ -890,7 +890,6 @@ class CRM_Core_DAO extends DB_DataObject {
while ($dao->fetch()) {
$values[] = $dao->TABLE_NAME;
}
$dao->free();
return $values;
}
......@@ -941,7 +940,6 @@ class CRM_Core_DAO extends DB_DataObject {
CRM_Core_Error::fatal();
}
$dao->free();
$show[$tableName] = $dao->Create_Table;
}
......@@ -969,7 +967,6 @@ class CRM_Core_DAO extends DB_DataObject {
CRM_Core_Error::fatal();
}
$dao->free();
$show[$tableName] = $dao->Create_Table;
}
......@@ -1005,7 +1002,6 @@ class CRM_Core_DAO extends DB_DataObject {
CRM_Core_Error::fatal();
}
$dao->free();
$show[$tableName] = $dao->Create_Table;
}
$constraint = "`FK_{$tableName}_{$columnName}`";
......@@ -1027,7 +1023,6 @@ class CRM_Core_DAO extends DB_DataObject {
$query = "SELECT * FROM $tableName WHERE $columnName != '$columnValue'";
$dao = CRM_Core_DAO::executeQuery($query);
$result = $dao->fetch() ? FALSE : TRUE;
$dao->free();
return $result;
}
......@@ -1044,7 +1039,6 @@ class CRM_Core_DAO extends DB_DataObject {
$query = "SELECT * FROM $tableName WHERE $columnName IS NOT NULL";
$dao = CRM_Core_DAO::executeQuery($query);
$result = $dao->fetch() ? FALSE : TRUE;
$dao->free();
return $result;
}
......@@ -1065,7 +1059,6 @@ LIKE %1
$dao = CRM_Core_DAO::executeQuery($query, $params);
$result = $dao->fetch() ? TRUE : FALSE;
$dao->free();
return $result;
}
......@@ -1432,7 +1425,6 @@ FROM civicrm_domain
) {
// we typically do this for insert/update/delete statements OR if explicitly asked to
// free the dao
$dao->free();
}
return $dao;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment