From: <cl...@us...> - 2003-11-14 04:59:58
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1:/tmp/cvs-serv32617/functions Modified Files: ical_parser.php list_icals.php Log Message: Fix for [ 831524 ] ghost events displayed, changed config to not save parsed cals, and took the double getdate out of list_icals. Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -d -r1.114 -r1.115 *** ical_parser.php 13 Nov 2003 06:02:47 -0000 1.114 --- ical_parser.php 14 Nov 2003 04:59:15 -0000 1.115 *************** *** 259,265 **** if (!$write_processed) $master_array[$start_date][($hour.$minute)][$uid]['exception'] = true; } else { ! $nbrOfOverlaps = checkOverlap($start_date, $start_time, $end_time, $uid); ! $master_array[($start_date)][($hour.$minute)][$uid] = array ('event_start' => $start_time, 'event_end' => $end_time, 'start_unixtime' => $start_unixtime, 'end_unixtime' => $end_unixtime, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => $nbrOfOverlaps, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => false, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber ); ! if (!$write_processed) $master_array[($start_date)][($hour.$minute)][$uid]['exception'] = true; } } --- 259,268 ---- if (!$write_processed) $master_array[$start_date][($hour.$minute)][$uid]['exception'] = true; } else { ! // This if statement should prevent writing of an excluded date if its the first recurrance - CL ! if (!in_array($start_date, $except_dates)) { ! $nbrOfOverlaps = checkOverlap($start_date, $start_time, $end_time, $uid); ! $master_array[($start_date)][($hour.$minute)][$uid] = array ('event_start' => $start_time, 'event_end' => $end_time, 'start_unixtime' => $start_unixtime, 'end_unixtime' => $end_unixtime, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => $nbrOfOverlaps, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => false, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber ); ! if (!$write_processed) $master_array[($start_date)][($hour.$minute)][$uid]['exception'] = true; ! } } } *************** *** 567,571 **** $recur_data_day = date('d', $recur_data_time); $recur_data_date = $recur_data_year.$recur_data_month.$recur_data_day; ! if (($recur_data_time > $start_date_time) && ($recur_data_time <= $end_date_time) && ($count_to != $count) && !in_array($recur_data_date, $except_dates)) { if (isset($allday_start) && $allday_start != '') { --- 570,574 ---- $recur_data_day = date('d', $recur_data_time); $recur_data_date = $recur_data_year.$recur_data_month.$recur_data_day; ! if (($recur_data_time > $start_date_time) && ($recur_data_time <= $end_date_time) && ($count_to != $count) && !in_array($recur_data_date, $except_dates)) { if (isset($allday_start) && $allday_start != '') { *************** *** 617,623 **** } ! // Clear event data now that it's been saved. ! unset($start_time, $start_time_tmp, $end_time, $end_time_tmp, $start_unixtime, $start_unixtime_tmp, $end_unixtime, $end_unixtime_tmp, $summary, $length, $nbrOfOverlaps, $description, $status, $class, $location, $organizer, $attendee); ! // Begin VTODO Support } elseif ($line == 'END:VTODO') { --- 620,642 ---- } ! // This should remove any exdates that were missed. ! // Added for version 0.9.5 ! if (is_array($except_dates)) { ! foreach ($except_dates as $key => $value) { ! $time = $except_times[$key]; ! unset($master_array[$value][$time][$uid]); ! if (count($master_array[$value][$time]) < 1) { ! unset($master_array[$value][$time]); ! if (count($master_array[$value]) < 1) { ! unset($master_array[$value]); ! } ! } ! } ! } ! ! // Clear event data now that it's been saved. ! unset($start_time, $start_time_tmp, $end_time, $end_time_tmp, $start_unixtime, $start_unixtime_tmp, $end_unixtime, $end_unixtime_tmp, $summary, $length, $nbrOfOverlaps, $description, $status, $class, $location, $organizer, $attendee); ! ! // Begin VTODO Support } elseif ($line == 'END:VTODO') { Index: list_icals.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/list_icals.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** list_icals.php 13 Nov 2003 06:02:47 -0000 1.18 --- list_icals.php 14 Nov 2003 04:59:15 -0000 1.19 *************** *** 3,11 **** // start of <select> tag - if (isset($getdate)) { - $query="&getdate=$getdate"; - } else { - $query=""; - } echo "<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value+'"; if (isset($query)) echo $query; --- 3,6 ---- |