From acebbba9315e1fd08c3b09a6dabc128ddfdb37e9 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 9 Feb 2015 09:03:50 +0000 Subject: [PATCH] fix server-side of switching info-type specific template "infolog.index.rows.$type" for type $type" --- infolog/inc/class.infolog_ui.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index 090ec039a2..3864e8987b 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -387,7 +387,7 @@ class infolog_ui } // check if we have a custom, type-specific template - unset($query['template']); + $query['template'] = 'infolog.index.rows'; unset($query['custom_fields']); if ($query['col_filter']['info_type']) { @@ -397,7 +397,6 @@ class infolog_ui $query['template'] = $tpl->name; $query['custom_fields'] = true; // read the custom fields too } - //echo "

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

\n"; // If status is not valid for selected type, clear status filter if($query['col_filter']['info_status'] && $query['col_filter']['info_status'] != 'deleted' && !in_array($query['col_filter']['info_status'], $this->bo->status[$query['col_filter']['info_type']])) @@ -408,8 +407,9 @@ class infolog_ui // do we need to read the custom fields, depends on the column is enabled and customfields exist, prefs are filter specific // so we have to check that as well $details = $query['filter2'] == 'all'; - $columnselection_pref = 'nextmatch-'.($query['action'] ? 'infolog.'.$query['action'] : (is_object($query['template']) ? $query['template']->name : 'infolog.index.rows')) + $columnselection_pref = 'nextmatch-'.($query['action'] ? 'infolog.'.$query['action'] : ($tpl && $tpl->name == $query['template'] ? $query['template'] : 'infolog.index.rows')) .($details ? '-details' : ''); + //error_log(__METHOD__."(start=$query[start], num_rows=$query[num_rows]) query[col_filter][info_type]={$query['col_filter']['info_type']} --> query[template]=$query[template], columselection_pref=$columnselection_pref"); $columselection = $this->prefs[$columnselection_pref];