mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-04 12:30:04 +01:00
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 (!(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(
|
return $this->db->insert($this->ab2list_table,array(
|
||||||
'contact_id' => $contact,
|
'contact_id' => $contact,
|
||||||
'list_id' => $list,
|
'list_id' => $list,
|
||||||
|
Loading…
Reference in New Issue
Block a user