summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_contacts.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-03-31 15:45:02 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-03-31 15:45:02 +0000
commit96f1848ec1d5d4e19ab9d1049ccbc2b84ccfd9f9 (patch)
tree6686b8fd9c301789f7c41be9cd1a4d1f4c7fbd4c /roundcubemail/program/include/rcube_contacts.php
parentae3bf0afc39f46d5b950d07df269d1542a8e9c0f (diff)
Also remove contactgroupmembers when deleting a contact
git-svn-id: https://svn.roundcube.net/trunk@3451 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_contacts.php')
-rw-r--r--roundcubemail/program/include/rcube_contacts.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_contacts.php b/roundcubemail/program/include/rcube_contacts.php
index 0946b05f2..2964cde49 100644
--- a/roundcubemail/program/include/rcube_contacts.php
+++ b/roundcubemail/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