Also remove contactgroupmembers when deleting a contact

release-0.6
thomascube 15 years ago
parent 64d855c9b1
commit bb6294a26e

@ -399,6 +399,13 @@ class rcube_contacts extends rcube_addressbook
if (is_array($ids)) if (is_array($ids))
$ids = join(',', $ids); $ids = join(',', $ids);
// delete all group members linked with these contacts
if ($this->groups) {
$this->db->query(
"DELETE FROM ".get_table_name('contactgroupmembers')."
WHERE contact_id IN (".$ids.")");
}
$this->db->query( $this->db->query(
"UPDATE ".$this->db_name." "UPDATE ".$this->db_name."
SET del=1 SET del=1

Loading…
Cancel
Save