diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index d47e3db399..46db2dc853 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -341,13 +341,22 @@ class uiinfolog } //echo "
template ='".'infolog.index.rows.'.$query['col_filter']['info_type']."'".(!$query['template'] ? ' not' : '')." found
\n"; } - // do we need to read the custom fields, depends on the column is enabled and customfields exist - $columselection = $this->prefs['nextmatch-infolog.index.rows']; + // 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'; + $columselection = $this->prefs['nextmatch-infolog.index.rows'.($details?'-details':'')]; //_debug_array($columselection); if ($columselection) { - if (!isset($query['selectcols'])) $query['selectcols']=$columselection; + $query['selectcols']=$columselection; $columselection = explode(',',$columselection); + } else { + if (isset($query['selectcols'])) + { + $columselection =explode(',',$query['selectcols']); + } else { + $columselection=array(); + } } $show_custom_fields = (!$columselection || in_array('customfields',$columselection)) && $this->bo->customfields; $lv_customfields=array(); // used to set the visible columns @@ -366,13 +375,11 @@ class uiinfolog { $lv_customfields[$cf]=$cfa; $readonlys['#'.$cf] = true; - if (stripos($query['selectcols'],'#'.$cf)===FALSE) $query['selectcols'].=",#".$cf; } } else { if ($showallcustfields==1 || in_array('#'.$cf,$columselection)) { $lv_customfields[$cf]=$cfa; $readonlys['#'.$cf] = true; - if (stripos($query['selectcols'],'#'.$cf)===FALSE) $query['selectcols'].=",#".$cf; } } // set the array for the available cust-cols @@ -387,7 +394,6 @@ class uiinfolog $lv_customfields[$name]=$value; //echo $name."->". $value['label']."