From 14bb051462a6614ef58ff066bc4bebd568c7808a Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Tue, 30 Dec 2008 03:48:12 +0000 Subject: day view and month bottom problems bug 2476126 --- calendars/test.ics | 13 ++++++++++++- default_config.php | 2 +- functions/parse/end_vevent.php | 3 +-- functions/template.php | 15 +++++---------- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/calendars/test.ics b/calendars/test.ics index a62dec1..4f525b4 100644 --- a/calendars/test.ics +++ b/calendars/test.ics @@ -64,6 +64,17 @@ DTSTART:20070621T003000Z DTEND:20070621T013000Z END:VEVENT +BEGIN:VEVENT +SEQUENCE:7 +UID:test +DTSTAMP:20020918T224617Z +SUMMARY:test foo +STATUS:CONFIRMED +DTSTART;TZID=US/Central:20081229T20000 +DTEND;TZID=US/Central:20081229T24000 +URL:http://google.com +END:VEVENT + BEGIN:VEVENT SEQUENCE:7 UID:starts on 12 @@ -71,7 +82,7 @@ DTSTAMP:20020918T224617Z SUMMARY:Later overlap STATUS:CONFIRMED DURATION:P5D -DTSTART;TZID=US/Eastern:20081212 +DTSTART;TZID=US/Eastern:20081225 URL:http://google.com END:VEVENT diff --git a/default_config.php b/default_config.php index 4eeadc4..9f99379 100644 --- a/default_config.php +++ b/default_config.php @@ -2,7 +2,7 @@ class Configs{ private static $instance; private function __construct(){ - $this->phpicalendar_version = '2.3'; + $this->phpicalendar_version = '2.31rc1'; // Configuration file for PHP iCalendar 2.25rc1 // // To set values, change the text between the single quotes diff --git a/functions/parse/end_vevent.php b/functions/parse/end_vevent.php index 3e2ea4e..9f2e603 100644 --- a/functions/parse/end_vevent.php +++ b/functions/parse/end_vevent.php @@ -10,7 +10,6 @@ What happens in this file: 2. Build recur_data array 3. Add occurrences to master_array */ - if (!isset($start_date)) $start_date = "19700101"; // CLASS support @@ -320,7 +319,7 @@ foreach($recur_data as $recur_data_unixtime) { # the day is not the last day of the recurrence if ($this_date_tmp < $end_date_tmp) $display_end_tmp = '2400'; } - if($this_date_tmp == $end_date_tmp && ($end_time == '0000' && $time_key == -1)) continue; + if($this_date_tmp == $end_date_tmp && ($end_time == '0000')) continue; $master_array[$this_date_tmp][$time_key][$uid] = array ( 'event_start' => $start_time, # hhmm 'event_end' => $end_time, # hhmm diff --git a/functions/template.php b/functions/template.php index dc43af2..7c56f38 100644 --- a/functions/template.php +++ b/functions/template.php @@ -563,7 +563,7 @@ class Page { $loop_dof = trim($match1[1]); $start_wt = strtotime(dateOfWeek($getdate, $phpiCal_config->week_start_day)); $start_day = strtotime(dateOfWeek($getdate, $phpiCal_config->week_start_day)); - for ($i=0; $i<$phpiCal_config->week_length; $i++) { + for ($i=0; $i< $phpiCal_config->week_length; $i++) { $day_num = date("w", $start_day); $daylink = date('Ymd', $start_wt); if ($current_view == 'day') { @@ -645,7 +645,7 @@ class Page { // check for eventstart if (isset($this_time_arr) && sizeof($this_time_arr) > 0) { foreach ($this_time_arr as $eventKey => $loopevent) { - $drawEvent = drawEventTimes ($cal_time, $loopevent['event_end']); + $drawEvent = drawEventTimes ($cal_time, $loopevent['display_end']); $j = 0; while (isset($event_length[$j])) { if ($event_length[$j]['state'] == 'ended') { @@ -697,11 +697,6 @@ class Page { } $event_length[$i]['state'] = 'started'; $uid = $event_length[$i]['key']; - $event_start = strtotime ($this_time_arr[$uid]['event_start']); - $event_end = strtotime ($this_time_arr[$uid]['event_end']); - if (isset($this_time_arr[$uid]['display_end'])) $event_end = strtotime ($this_time_arr[$uid]['display_end']); - $event_start = date ($timeFormat, $event_start); - $event_end = date ($timeFormat, $event_end); $event_calno = $this_time_arr[$uid]['calnumber']; $event_recur = $this_time_arr[$uid]['recur']; $event_status = strtolower($this_time_arr[$uid]['status']); @@ -716,8 +711,8 @@ class Page { $event_temp = $loop_event; $event = openevent($getdate, $cal_time, $uid, $this_time_arr[$uid], 0, 0, 'ps'); $event_temp = str_replace('{EVENT}', $event, $event_temp); - $event_temp = str_replace('{EVENT_START}', $event_start, $event_temp); - $event_temp = str_replace('{EVENT_END}', $event_end, $event_temp); + $event_temp = str_replace('{EVENT_START}', date($timeFormat, $this_time_arr[$uid]['start_unixtime']), $event_temp); + $event_temp = str_replace('{EVENT_END}', date($timeFormat, $this_time_arr[$uid]['end_unixtime']), $event_temp); $event_temp = str_replace('{CONFIRMED}', $confirmed, $event_temp); $event_temp = str_replace('{EVENT_CALNO}', $event_calno, $event_temp); $daydisplay .= $event_temp; @@ -1068,7 +1063,7 @@ class Page { $event_start = $val['start_unixtime']; $event_end = (isset($val['display_end'])) ? $val['display_end'] : $val["event_end"]; $event_start = date($timeFormat, $val['start_unixtime']); - $event_end = date($timeFormat, @strtotime ($event_end)); + $event_end = date($timeFormat, $val['end_unixtime']); $switch['START_TIME'] = $event_start . ' - ' . $event_end; $switch['EVENT_TEXT'] = openevent($m_start, $cal_time, $uid, $val, 0, 15, 'psf'); $switch['DESCRIPTION'] = urldecode($val['description']); -- cgit v1.2.3