Skip to content
Snippets Groups Projects
Commit 1747bb34 authored by eileen's avatar eileen
Browse files

#1747 don't drop temp tables on class destruct.

Recent code clean up means the search class is now dropped more quickly - meaning that dropping
these tables in the destructors is too aggressive. Since they are memory tables & temp tables they get
cleaned up anyway I think. We should move this search to an extension that ships with core, not necessarily
enabled on initial install but that is up for discussion
parent eaba3c3e
No related branches found
No related tags found
No related merge requests found
......@@ -383,19 +383,6 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
return $dao->N;
}
public function __destruct() {
//drop the temp. tables if they exist
if ($this->_igTable && !empty($this->_includeGroups)) {
$sql = "DROP TEMPORARY TABLE IF EXISTS {$this->_igTable}";
CRM_Core_DAO::executeQuery($sql);
}
if ($this->_xgTable && !empty($this->_excludeGroups)) {
$sql = "DROP TEMPORARY TABLE IF EXISTS {$this->_xgTable}";
CRM_Core_DAO::executeQuery($sql);
}
}
/**
* @param string $tableAlias
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment