forked from extern/egroupware
fix for bug #589: SQL error on adding an existing distribution list again
This commit is contained in:
parent
346f5e6be1
commit
d60659935a
@ -397,6 +397,13 @@ class socontacts_sql extends so_sql
|
|||||||
{
|
{
|
||||||
if (!$name || !(int)$owner) return false;
|
if (!$name || !(int)$owner) return false;
|
||||||
|
|
||||||
|
if ($this->db->select($this->lists_table,'list_id',array(
|
||||||
|
'list_name' => $name,
|
||||||
|
'list_owner' => $owner,
|
||||||
|
),__LINE__,__FILE__) && $this->db->next_record())
|
||||||
|
{
|
||||||
|
return $this->db->f('list_id'); // return existing list-id
|
||||||
|
}
|
||||||
if (!$this->db->insert($this->lists_table,array(
|
if (!$this->db->insert($this->lists_table,array(
|
||||||
'list_name' => $name,
|
'list_name' => $name,
|
||||||
'list_owner' => $owner,
|
'list_owner' => $owner,
|
||||||
|
Loading…
Reference in New Issue
Block a user