forked from extern/egroupware
fix for bug #626: sql error when adding to distribution list
This commit is contained in:
parent
1aca20e56d
commit
09bfe009aa
@ -432,6 +432,13 @@ class socontacts_sql extends so_sql
|
||||
{
|
||||
if (!(int)$list || !(int)$contact) return false;
|
||||
|
||||
if ($this->db->select($this->ab2list_table,'list_id',array(
|
||||
'contact_id' => $contact,
|
||||
'list_id' => $list,
|
||||
),__LINE__,__FILE__) && $this->db->next_record())
|
||||
{
|
||||
return true; // no need to insert it, would give sql error
|
||||
}
|
||||
return $this->db->insert($this->ab2list_table,array(
|
||||
'contact_id' => $contact,
|
||||
'list_id' => $list,
|
||||
|
Loading…
Reference in New Issue
Block a user