From 50baa1af348a97be41e3215f6a69b939a0d6720d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 22 May 2014 16:38:22 +0000 Subject: [PATCH] fixed different column-selection for "Details" and "No details" and therefore not calculated timesheet sum --- infolog/inc/class.infolog_ui.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index c7facfa549..d2c2c20803 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -366,7 +366,7 @@ class infolog_ui //_debug_array($columselection); if ($columselection) { - $columselection = is_array($columnselection) ? $columnselection : explode(',',$columselection); + $columselection = is_array($columselection) ? $columselection : explode(',',$columselection); } else { @@ -384,16 +384,16 @@ class infolog_ui // add a '-details' to the name of the columnselection pref if ($details) { - $columnselection_pref = (is_object($query['template'])?$query['template']->name:'infolog.index.rows').'-details'; + $query['columnselection-pref'] = 'nextmatch-'.(is_object($query['template'])?$query['template']->name:'infolog.index.rows').'-details'; $query['default_cols'] = '!cat_id,info_used_time_info_planned_time,info_used_time_info_planned_time_info_replanned_time,info_id,actions'; } else { - $columnselection_pref = 'infolog.index.rows'; + $query['columnselection-pref'] = 'nextmatch-infolog.index.rows'; $query['default_cols'] = '!cat_id,info_datemodified,info_used_time_info_planned_time,info_used_time_info_planned_time_info_replanned_time,info_id,actions'; } // set old show_times pref, that get_info calculates the cumulated time of the timesheets (we only check used&planned to work for both time cols) - $this->prefs['show_times'] = strpos($this->prefs['nextmatch-'.$columnselection_pref],'info_used_time_info_planned_time') !== false; + $this->prefs['show_times'] = strpos($this->prefs[$query['columnselection-pref']],'info_used_time_info_planned_time') !== false; // query all links and sub counts in one go if ($infos && (!$query['csv_export'] || !is_array($query['csv_export'])))