mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-18 04:31:06 +01:00
fixed not shown empty distribution lists in 11.1 after changes
This commit is contained in:
parent
5b12fe97dc
commit
26153f9fa6
@ -483,8 +483,10 @@ class addressbook_sql extends so_sql_cf
|
|||||||
$uids[] = $this->db->expression($this->lists_table, $this->lists_table.'.',array('list_id' => $ids));
|
$uids[] = $this->db->expression($this->lists_table, $this->lists_table.'.',array('list_id' => $ids));
|
||||||
}
|
}
|
||||||
$lists = array();
|
$lists = array();
|
||||||
|
$table_def = $this->db->get_table_definitions('phpgwapi',$this->lists_table);
|
||||||
|
$group_by = 'GROUP BY '.$this->lists_table.'.'.implode(','.$this->lists_table.'.',array_keys($table_def['fd']));
|
||||||
foreach($this->db->select($this->lists_table,$this->lists_table.'.*,MAX(list_added) AS list_modified',$uid_column?array($uid_column=>$uids):$uids,__LINE__,__FILE__,
|
foreach($this->db->select($this->lists_table,$this->lists_table.'.*,MAX(list_added) AS list_modified',$uid_column?array($uid_column=>$uids):$uids,__LINE__,__FILE__,
|
||||||
false,'ORDER BY list_owner<>'.(int)$GLOBALS['egw_info']['user']['account_id'].',list_name',false,0,
|
false,$group_by.' ORDER BY list_owner<>'.(int)$GLOBALS['egw_info']['user']['account_id'].',list_name',false,0,
|
||||||
"LEFT JOIN $this->ab2list_table ON $this->ab2list_table.list_id=$this->lists_table.list_id") as $row)
|
"LEFT JOIN $this->ab2list_table ON $this->ab2list_table.list_id=$this->lists_table.list_id") as $row)
|
||||||
{
|
{
|
||||||
if (!$row['list_id']) continue; // because of join, no lists at all still return one row of NULL
|
if (!$row['list_id']) continue; // because of join, no lists at all still return one row of NULL
|
||||||
|
Loading…
Reference in New Issue
Block a user