mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
"fixed not shown calendar if custom fields are selected too"
This commit is contained in:
parent
4cdf282644
commit
4682133d82
@ -831,16 +831,19 @@ class uicontacts extends bocontacts
|
||||
// do we need to read the custom fields, depends on the column is enabled and customfields exist
|
||||
$columselection = $this->prefs['nextmatch-addressbook.'.($do_email ? 'email' : 'index').'.rows'];
|
||||
if ($columselection) $columselection = explode(',',$columselection);
|
||||
if (!$id_only && $rows && (
|
||||
($show_custom_fields = (!$columselection || in_array('customfields',$columselection)) && $this->customfields) ||
|
||||
($show_calendar = !$columselection || in_array('calendar',$columselection))))
|
||||
if (!$id_only && $rows)
|
||||
{
|
||||
foreach((array) $rows as $n => $val)
|
||||
$show_custom_fields = (!$columselection || in_array('customfields',$columselection)) && $this->customfields;
|
||||
$show_calendar = !$columselection || in_array('calendar',$columselection);
|
||||
if ($show_calendar || $show_custom_fields)
|
||||
{
|
||||
if ($val && (int)$val['id']) $ids[] = $val['id'];
|
||||
foreach($rows as $val)
|
||||
{
|
||||
$ids[] = $val['id'];
|
||||
}
|
||||
if ($show_custom_fields) $customfields = $this->read_customfields($ids);
|
||||
if ($show_calendar) $calendar = $this->read_calendar($ids);
|
||||
}
|
||||
if ($ids && $show_custom_fields) $customfields = $this->read_customfields($ids);
|
||||
if ($ids && $show_calendar) $calendar = $this->read_calendar($ids);
|
||||
}
|
||||
}
|
||||
if (!$rows) $rows = array();
|
||||
|
Loading…
Reference in New Issue
Block a user