summaryrefslogtreecommitdiff
path: root/program/include/rcube_contacts.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2010-03-31 15:45:02 +0000
committerthomascube <thomas@roundcube.net>2010-03-31 15:45:02 +0000
commitbb6294a26e9ce1dca5e0b8f69a1144ea149e05fe (patch)
tree5a9f8baa22cba5ab12e4db117818ac65b0f31145 /program/include/rcube_contacts.php
parent64d855c9b161bac59fef77706d651536bf68c2be (diff)
Also remove contactgroupmembers when deleting a contact
Diffstat (limited to 'program/include/rcube_contacts.php')
-rw-r--r--program/include/rcube_contacts.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/program/include/rcube_contacts.php b/program/include/rcube_contacts.php
index 0946b05f2..2964cde49 100644
--- a/program/include/rcube_contacts.php
+++ b/program/include/rcube_contacts.php
@@ -399,6 +399,13 @@ class rcube_contacts extends rcube_addressbook
if (is_array($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(
"UPDATE ".$this->db_name."
SET del=1