diff --git a/calendar/inc/class.calendar.inc.php b/calendar/inc/class.calendar.inc.php index 814aebdaec..888c6c2864 100755 --- a/calendar/inc/class.calendar.inc.php +++ b/calendar/inc/class.calendar.inc.php @@ -459,7 +459,7 @@ class calendar extends calendar_ $search_date_dow = date('w',$datetime); $search_beg_day = mktime(0,0,0,$search_date_month,$search_date_day,$search_date_year); @reset($this->repeated_events); - $repeated = $this->repeated_event; + $repeated = $this->repeated_events; $r_events = count($repeated); for ($i=0;$i<$r_events;$i++) { @@ -1864,23 +1864,42 @@ class calendar extends calendar_ switch($j) { case 0: - if($interval == 4) - { - $k = ($i<=9?'0':substr($i,0,1)); - } - $str .= ''; - $str .= '"; - $str .= $k.''; - break; case 1: - if($interval == 4) +// if($interval == 4) +// { +// $k = ($i<=9?'0':substr($i,$j,$j+1)); +// } +// else +// { + switch($j) { - $k = ($i<=9?substr($i,0,1):substr($i,1,2)); + case 0: + $pre = '0'; + break; + case 1: + $pre = substr($i,0,1); + break; } + + $k = ($i<=9?$pre:substr($i,$j,$j+1)); +// } $str .= ''; - $str .= '"; + $str .= '"; $str .= $k.''; break; +// case 1: +// if($interval == 4) +// { +// $k = ($i<=9?substr($i,0,1):substr($i,1,2)); +// } +// else +// { +// $k = ($i<=9?substr($i,0,1):substr($i,1,2)); +// } +// $str .= ''; +// $str .= '"; +// $str .= $k.''; +// break; default: $str .= ''; $str .= '"; diff --git a/calendar/preferences.php b/calendar/preferences.php index f71d549d76..1a728d6859 100644 --- a/calendar/preferences.php +++ b/calendar/preferences.php @@ -32,6 +32,7 @@ $phpgw->preferences->add('calendar','defaultcalendar'); $phpgw->preferences->add('calendar','defaultfilter'); $phpgw->preferences->add('calendar','locale'); + $phpgw->preferences->add('calendar','interval'); if ($mainscreen_showevents == True) { $phpgw->preferences->add('calendar','mainscreen_showevents'); @@ -185,6 +186,30 @@ . ''; display_item(lang('Default calendar filter'),$str); + $selected = array(); + $selected[intval($phpgw_info['user']['preferences']['calendar']['interval'])] = ' selected'; + if (! isset($phpgw_info['user']['preferences']['calendar']['interval'])) + { + $selected[60] = ' selected'; + } + $var = Array( + 5 => '5', + 10 => '10', + 15 => '15', + 20 => '20', + 30 => '30', + 45 => '45', + 60 => '60' + ); + + $str = ''; + display_item(lang('Display interval in Day View'),$str); + $str = ''; display_item(lang('Send/receive updates via email'),$str);