diff --git a/infolog/inc/class.soinfolog.inc.php b/infolog/inc/class.soinfolog.inc.php index ee8ff34467..4544aa6521 100644 --- a/infolog/inc/class.soinfolog.inc.php +++ b/infolog/inc/class.soinfolog.inc.php @@ -601,6 +601,14 @@ class soinfolog // DB-Layer $ids[$info['info_id']] = $info; } + if ($ids && $query['custom_fields']) + { + $this->db->select($this->extra_table,'*',array('info_id'=>array_keys($ids)),__LINE__,__FILE__); + while ($row = $this->db->row(true)) + { + $ids[$row['info_id']]['#'.$row['info_extra_name']] = $row['info_extra_value']; + } + } } else { diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index 778024e4ed..c9604ef77a 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -292,6 +292,19 @@ class uiinfolog $this->save_sessiondata($query); + // check if we have a custom, type-specific template + unset($query['template']); + unset($query['custom_fields']); + if ($query['col_filter']['info_type']) + { + $tpl =& new etemplate; + if ($tpl->read('infolog.index.rows.'.$query['col_filter']['info_type'])) + { + $query['template'] =& $tpl; + $query['custom_fields'] = true; // read the custom fields too + } + //echo "

template ='".'infolog.index.rows.'.$query['col_filter']['info_type']."'".(!$query['template'] ? ' not' : '')." found

\n"; + } $ids = $this->bo->search($query); if (!is_array($ids)) { @@ -324,13 +337,6 @@ class uiinfolog $GLOBALS['egw_info']['flags']['app_header'] = lang('Infolog').($query['filter'] == 'none' ? '' : ' - '.lang($this->filters[$query['filter']])); } - unset($query['template']); - if ($query['col_filter']['info_type']) - { - $tpl =& new etemplate; - if ($tpl->read('infolog.index.rows.'.$query['col_filter']['info_type'])) $query['template'] =& $tpl; - //echo "

template ='".'infolog.index.rows.'.$query['col_filter']['info_type']."'".(!$query['template'] ? ' not' : '')." found

\n"; - } return $query['total']; }