prevent SQL error "contact_owner is ambigues"

This commit is contained in:
Ralf Becker 2006-06-24 05:54:28 +00:00
parent 4ec908ebe4
commit fbcded1a6b

View File

@ -89,7 +89,7 @@ class socontacts_sql extends so_sql
{
if ($this->account_repository != 'sql' && $this->contact_repository != 'sql-ldap')
{
$filter[] = 'contact_owner != 0'; // in case there have been accounts in sql previously
$filter[] = $this->table_name.'.contact_owner != 0'; // in case there have been accounts in sql previously
}
$filter[] = "(contact_owner=".(int)$GLOBALS['egw_info']['user']['account_id'].
" OR contact_private=0 AND contact_owner IN (".
@ -232,7 +232,7 @@ class socontacts_sql extends so_sql
{
if ($this->account_repository != 'sql' && $this->contact_repository != 'sql-ldap')
{
$filter[] = 'contact_owner != 0'; // in case there have been accounts in sql previously
$filter[] = $this->table_name.'.contact_owner != 0'; // in case there have been accounts in sql previously
}
$filter[] = "($this->table_name.contact_owner=".(int)$GLOBALS['egw_info']['user']['account_id'].
" OR contact_private=0 AND $this->table_name.contact_owner IN (".