|
From: <ji...@us...> - 2008-12-26 16:59:15
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18788/functions/parse Modified Files: end_vevent.php Log Message: eliminate negative event lengths and adjust display lengths for short events Index: end_vevent.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/end_vevent.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** end_vevent.php 26 Dec 2008 08:26:31 -0000 1.15 --- end_vevent.php 26 Dec 2008 16:59:10 -0000 1.16 *************** *** 49,53 **** } } ! # look for events that span more than one day if (isset($start_unixtime,$end_unixtime) && date('Ymd',$start_unixtime) != date('Ymd',$end_unixtime)) { --- 49,58 ---- } } ! # disallow events with negative length ! if ($end_unixtime < $start_unixtime){ ! $end_date = $start_date; ! $end_time = $start_time; ! $end_unixtime = $start_unixtime; ! } # look for events that span more than one day if (isset($start_unixtime,$end_unixtime) && date('Ymd',$start_unixtime) != date('Ymd',$end_unixtime)) { *************** *** 64,70 **** preg_match ('/([0-9]{2})([0-9]{2})/', $end_time, $time2); if (isset($start_unixtime) && isset($end_unixtime)) { ! $length = $end_unixtime - $start_unixtime; } else { ! $length = ($time2[1]*60+$time2[2]) - ($time[1]*60+$time[2]); } --- 69,75 ---- preg_match ('/([0-9]{2})([0-9]{2})/', $end_time, $time2); if (isset($start_unixtime) && isset($end_unixtime)) { ! $length = $end_unixtime - $start_unixtime; } else { ! $length = ($time2[1]*60+$time2[2]) - ($time[1]*60+$time[2]); } |