From 97eb05e04de8938ae9d8cd1b086f77d199bdfc70 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 20 Sep 2017 10:30:14 -0600 Subject: [PATCH] * Timesheet - Fix bug where user column dissapears if you have custom fields and resize a column --- timesheet/inc/class.timesheet_ui.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index 8f2dac809d..305d3908a4 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -823,7 +823,14 @@ class timesheet_ui extends timesheet_bo $rows['no_cat_id'] = (!$have_cats || $query['cat_id']); if ($query['col_filter']['ts_owner']) $rows['ownerClass'] = 'noPrint'; $rows['no_owner_col'] = $query['no_owner_col']; - if (!$rows['no_owner_col'] && $query['selectcols'] && !strpos($query['selectcols'],'ts_owner')) $rows['no_owner_col'] = 1; + if(is_string($query['selectcols'])) + { + $query['selectcols'] = explode(',', $query['selectcols']); + } + if (!$rows['no_owner_col'] && $query['selectcols'] && !in_array('ts_owner', $query['selectcols'])) + { + $rows['no_owner_col'] = 1; + } $rows += $this->summary;