append if not contact type for the element
This commit is contained in:
BENKE Charlie 2016-06-04 17:55:28 +02:00
parent d1727139f0
commit d86f89a8fa

View File

@ -744,7 +744,8 @@ abstract class CommonObject
$sql = "DELETE FROM ".MAIN_DB_PREFIX."element_contact";
$sql.= " WHERE element_id = ".$this->id;
$sql.= " AND fk_c_type_contact IN (".$listId.")";
if ($listId)
$sql.= " AND fk_c_type_contact IN (".$listId.")";
dol_syslog(get_class($this)."::delete_linked_contact", LOG_DEBUG);
if ($this->db->query($sql))