From 930db9f0c0e787287e24346f44c30a7e17dbc27c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 7 Oct 2004 22:09:02 +0000 Subject: [PATCH] all days, weekdays, weekend only for mutiple rows --- etemplate/inc/class.select_widget.inc.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/etemplate/inc/class.select_widget.inc.php b/etemplate/inc/class.select_widget.inc.php index 71a081c7dd..38bcd7cab4 100644 --- a/etemplate/inc/class.select_widget.inc.php +++ b/etemplate/inc/class.select_widget.inc.php @@ -301,11 +301,15 @@ define('MCAL_M_ALLDAYS',127); } $weekstart = $GLOBALS['phpgw_info']['user']['preferences']['calendar']['weekdaystarts']; - $cell['sel_options'] = array( - MCAL_M_ALLDAYS => 'all days', - MCAL_M_WEEKDAYS => 'working days', - MCAL_M_WEEKEND => 'weekend', - ); + $cell['sel_options'] = array(); + if ($rows >= 2) + { + $cell['sel_options'] = array( + MCAL_M_ALLDAYS => 'all days', + MCAL_M_WEEKDAYS => 'working days', + MCAL_M_WEEKEND => 'weekend', + ); + } if ($weekstart == 'Saturday') $cell['sel_options'][MCAL_M_SATURDAY] = 'saturday'; if ($weekstart != 'Monday') $cell['sel_options'][MCAL_M_SUNDAY] = 'sunday'; $cell['sel_options'] += array(