summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_contacts.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-04-13 07:24:09 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-04-13 07:24:09 +0000
commit14da6187de40ae201a20b80aa958ae8d0b14f553 (patch)
treec9d49ac69cc1ef87174adf01017fd695b2fcde62 /roundcubemail/program/include/rcube_contacts.php
parent5e3c5775c0b6c6df664412e8bdf5872dfe9e8a9e (diff)
Assign newly created contacts to the active group (#1486626) and fix group selection display (#1486619)
git-svn-id: https://svn.roundcube.net/trunk@3485 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_contacts.php')
-rw-r--r--roundcubemail/program/include/rcube_contacts.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_contacts.php b/roundcubemail/program/include/rcube_contacts.php
index 070e00ffd..dd37972c2 100644
--- a/roundcubemail/program/include/rcube_contacts.php
+++ b/roundcubemail/program/include/rcube_contacts.php
@@ -212,7 +212,7 @@ class rcube_contacts extends rcube_addressbook
if ($col == 'ID' || $col == $this->primary_key)
{
$ids = !is_array($value) ? explode(',', $value) : $value;
- $add_where[] = $this->primary_key.' IN ('.join(',', $ids).')';
+ $add_where[] = 'c.' . $this->primary_key.' IN ('.join(',', $ids).')';
}
else if ($strict)
$add_where[] = $this->db->quoteIdentifier($col).'='.$this->db->quote($value);
@@ -336,6 +336,10 @@ class rcube_contacts extends rcube_addressbook
$insert_id = $this->db->insert_id('contacts');
}
+
+ // also add the newly created contact to the active group
+ if ($insert_id && $this->group_id)
+ $this->add_to_group($this->group_id, $insert_id);
return $insert_id;
}