forked from extern/egroupware
using a type-specific template in the list, if it exists
This commit is contained in:
parent
c98a675df0
commit
2f3d566207
@ -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
|
||||
{
|
||||
|
@ -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 "<p align=right>template ='".'infolog.index.rows.'.$query['col_filter']['info_type']."'".(!$query['template'] ? ' not' : '')." found</p>\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 "<p align=right>template ='".'infolog.index.rows.'.$query['col_filter']['info_type']."'".(!$query['template'] ? ' not' : '')." found</p>\n";
|
||||
}
|
||||
return $query['total'];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user