From: <ji...@us...> - 2008-12-20 03:22:58
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5363/functions Modified Files: draw_functions.php ical_parser.php template.php Log Message: misc error warnings and notices Index: draw_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/draw_functions.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** draw_functions.php 11 Dec 2008 21:54:52 -0000 1.6 --- draw_functions.php 20 Dec 2008 03:22:54 -0000 1.7 *************** *** 6,11 **** $gridLength = $phpiCal_config->gridLength; preg_match ('/([0-9]{2})([0-9]{2})/', $start, $time); ! $sta_h = $time[1]; ! $sta_min = $time[2]; $sta_min = sprintf("%02d", floor($sta_min / $gridLength) * $gridLength); if ($sta_min == 60) { --- 6,11 ---- $gridLength = $phpiCal_config->gridLength; preg_match ('/([0-9]{2})([0-9]{2})/', $start, $time); ! $sta_h = @$time[1]; ! $sta_min = @$time[2]; $sta_min = sprintf("%02d", floor($sta_min / $gridLength) * $gridLength); if ($sta_min == 60) { *************** *** 15,20 **** preg_match ('/([0-9]{2})([0-9]{2})/', $end, $time); ! $end_h = $time[1]; ! $end_min = $time[2]; $end_min = sprintf("%02d", floor($end_min / $gridLength) * $gridLength); if ($end_min == 60) { --- 15,20 ---- preg_match ('/([0-9]{2})([0-9]{2})/', $end, $time); ! $end_h = @$time[1]; ! $end_min = @$time[2]; $end_min = sprintf("%02d", floor($end_min / $gridLength) * $gridLength); if ($end_min == 60) { Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.227 retrieving revision 1.228 diff -C2 -d -r1.227 -r1.228 *** ical_parser.php 20 Dec 2008 00:11:56 -0000 1.227 --- ical_parser.php 20 Dec 2008 03:22:54 -0000 1.228 *************** *** 136,140 **** $beginning, $start_of_vevent, $url, $valarm_description, $start_unixtime, $end_unixtime, $display_end_tmp, $end_time_tmp1, ! $recurrence_id, $uid, $rrule, $abs_until, $until_check, $until, $byweek, $byweekno, $byminute, $byhour, $bysecond --- 136,140 ---- $beginning, $start_of_vevent, $url, $valarm_description, $start_unixtime, $end_unixtime, $display_end_tmp, $end_time_tmp1, ! $recurrence_id, $uid, $rrule, $until_check, $until, $byweek, $byweekno, $byminute, $byhour, $bysecond *************** *** 171,177 **** break; case 'END:VTODO': ! if ((!$vtodo_priority) && ($status == 'COMPLETED')) { $vtodo_sort = 11; ! } elseif (!$vtodo_priority) { $vtodo_sort = 10; } else { --- 171,177 ---- break; case 'END:VTODO': ! if (($vtodo_priority == '') && ($status == 'COMPLETED')) { $vtodo_sort = 11; ! } elseif ($vtodo_priority == '') { $vtodo_sort = 10; } else { *************** *** 210,213 **** --- 210,223 ---- case 'BEGIN:VTODO': $vtodo_set = TRUE; + $summary = ''; + $due_date = ''; + $due_time = ''; + $completed_date = ''; + $completed_time = ''; + $vtodo_priority = ''; + $vtodo_categories = ''; + $status = ''; + $class = ''; + $description = ''; break; case 'BEGIN:VALARM': *************** *** 288,292 **** $except_dates[] = $regs[1] . $regs[2] . $regs[3]; // Added for Evolution, since they dont think they need to tell me which time to exclude. ! if (($regs[4] == '') && ($start_time != '')) { $except_times[] = $start_time; } else { --- 298,302 ---- $except_dates[] = $regs[1] . $regs[2] . $regs[3]; // Added for Evolution, since they dont think they need to tell me which time to exclude. ! if ($regs[4] == '' && isset($start_time) && $start_time != '') { $except_times[] = $start_time; } else { *************** *** 357,361 **** $offset_tmp = $chooseOffset($recur_unixtime); } ! $recur_unixtime = calcTime($offset_tmp, $server_offset_tmp, $recur_unixtime); $recurrence_id['date'] = date('Ymd', $recur_unixtime); $recurrence_id['time'] = date('Hi', $recur_unixtime); --- 367,371 ---- $offset_tmp = $chooseOffset($recur_unixtime); } ! $recur_unixtime = calcTime($offset_tmp, @$server_offset_tmp, $recur_unixtime); $recurrence_id['date'] = date('Ymd', $recur_unixtime); $recurrence_id['time'] = date('Hi', $recur_unixtime); Index: template.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** template.php 18 Dec 2008 09:22:23 -0000 1.98 --- template.php 20 Dec 2008 03:22:54 -0000 1.99 *************** *** 65,72 **** $seen_events = array(); foreach($master_array as $key => $val) { preg_match ('/([0-9]{6})([0-9]{2})/', $key, $regs); ! if ((($regs[1] == $parse_month) && ($printview == 'month')) || (($key == $getdate) && ($printview == 'day')) || ((($key >= $week_start) && ($key <= $week_end)) && ($printview == 'week')) || ((substr($regs[1],0,4) == $parse_year) && ($printview == 'year'))) { ! $events_week++; $dayofmonth = strtotime ($key); $dayofmonth = localizeDate ($dateFormat_day, $dayofmonth); --- 65,73 ---- $seen_events = array(); + $final = ''; foreach($master_array as $key => $val) { preg_match ('/([0-9]{6})([0-9]{2})/', $key, $regs); ! if (((@$regs[1] == $parse_month) && ($printview == 'month')) || (($key == $getdate) && ($printview == 'day')) || ((($key >= $week_start) && ($key <= $week_end)) && ($printview == 'week')) || ((substr(@$regs[1],0,4) == $parse_year) && ($printview == 'year'))) { ! @$events_week++; $dayofmonth = strtotime ($key); $dayofmonth = localizeDate ($dateFormat_day, $dayofmonth); *************** *** 75,81 **** $day_events = 0; // Pull out each day foreach ($val as $new_val) { foreach ($new_val as $new_key2 => $new_val2) { ! if (isset($seen_events["$new_key2"]) && $new_val2['spans_day'] == 1){ $new_val2['event_text'] .= " second instance of ".$new_key2; continue; --- 76,83 ---- $day_events = 0; // Pull out each day + $some_events = ''; foreach ($val as $new_val) { foreach ($new_val as $new_key2 => $new_val2) { ! if (isset($seen_events["$new_key2"]) && isset($new_val2['spans_day']) && $new_val2['spans_day'] == 1){ $new_val2['event_text'] .= " second instance of ".$new_key2; continue; *************** *** 83,94 **** $seen_events["$new_key2"] = 1; $day_events++; ! if ($new_val2['event_text']) { $event_text = stripslashes(urldecode($new_val2['event_text'])); ! $location = stripslashes(urldecode($new_val2['location'])); ! $description = stripslashes(urldecode($new_val2['description'])); ! $event_start = $new_val2['event_start']; ! $event_end = $new_val2['event_end']; if (isset($new_val2['display_end'])) $event_end = $new_val2['display_end']; ! if (!$new_val2['event_start']) { $event_start = $lang['l_all_day']; $event_start2 = ''; --- 85,96 ---- $seen_events["$new_key2"] = 1; $day_events++; ! if (isset($new_val2['event_text'])) { $event_text = stripslashes(urldecode($new_val2['event_text'])); ! $location = stripslashes(urldecode(@$new_val2['location'])); ! $description = stripslashes(urldecode(@$new_val2['description'])); ! $event_start = @$new_val2['event_start']; ! $event_end = @$new_val2['event_end']; if (isset($new_val2['display_end'])) $event_end = $new_val2['display_end']; ! if (!isset($new_val2['event_start'])) { $event_start = $lang['l_all_day']; $event_start2 = ''; *************** *** 120,124 **** $day_tmp = str_replace('{DAYOFMONTH}', $dayofmonth, $day_tmp); $final .= $day_tmp.$some_events; ! unset ($day_tmp, $some_events); } } --- 122,127 ---- $day_tmp = str_replace('{DAYOFMONTH}', $dayofmonth, $day_tmp); $final .= $day_tmp.$some_events; ! unset ($day_tmp); ! $some_events = ''; } } *************** *** 280,288 **** $loop_begin = trim($match2[1]); $loop_end = trim($match3[1]); foreach ($weekarray as $get_date) { $replace = $loop_begin; $colspan = 'colspan="'.$nbrGridCols[$get_date].'"'; $replace = str_replace('{COLSPAN}', $colspan, $replace); ! if (is_array($master_array[$get_date]['-1']) && !empty($master_array[$get_date]['-1']) ) { foreach ($master_array[$get_date]['-1'] as $uid => $allday) { $event_calno = $allday['calnumber']; --- 283,292 ---- $loop_begin = trim($match2[1]); $loop_end = trim($match3[1]); + $weekreplace = ''; foreach ($weekarray as $get_date) { $replace = $loop_begin; $colspan = 'colspan="'.$nbrGridCols[$get_date].'"'; $replace = str_replace('{COLSPAN}', $colspan, $replace); ! if (isset($master_array[$get_date]['-1']) && is_array($master_array[$get_date]['-1']) && !empty($master_array[$get_date]['-1']) ) { foreach ($master_array[$get_date]['-1'] as $uid => $allday) { $event_calno = $allday['calnumber']; *************** *** 351,354 **** --- 355,359 ---- $thisdate = ($thisdate + (25 * 60 * 60)); } + $weekdisplay = ''; foreach ($day_array as $key) { $cal_time = $key; *************** *** 468,472 **** // Start drawing the event $event_temp = $loop_event; ! $event = openevent($thisday, $cal_time, $uid, $this_time_arr[$uid], $week_events_lines, 25, 'ps'); $event_temp = str_replace('{EVENT}', $event, $event_temp); $event_temp = str_replace('{EVENT_START}', $event_start, $event_temp); --- 473,477 ---- // Start drawing the event $event_temp = $loop_event; ! $event = openevent($thisday, $cal_time, $uid, $this_time_arr[$uid], $phpiCal_config->week_events_lines, 25, 'ps'); $event_temp = str_replace('{EVENT}', $event, $event_temp); $event_temp = str_replace('{EVENT_START}', $event_start, $event_temp); *************** *** 739,746 **** $loop_t_ad = trim($match1[1]); $loop_t_e = trim($match2[1]); $return_adtmp = ''; $return_etmp = ''; ! if (is_array($master_array[$next_day]) && sizeof($master_array[$next_day]) > 0) { foreach ($master_array[$next_day] as $cal_time => $event_times) { foreach ($event_times as $uid => $val) { --- 744,753 ---- $loop_t_ad = trim($match1[1]); $loop_t_e = trim($match2[1]); + $replace_ad = ''; + $replace_e = ''; $return_adtmp = ''; $return_etmp = ''; ! if (isset($master_array[$next_day]) && is_array($master_array[$next_day]) && sizeof($master_array[$next_day]) > 0) { foreach ($master_array[$next_day] as $cal_time => $event_times) { foreach ($event_times as $uid => $val) { *************** *** 812,816 **** // --></script>"; ! $todo .= '<a class="psf" title="'.$title.'" href="#" onclick="openTodoInfo('.$todo_popup_data_index.'); return false;">'; $todo_popup_data_index++; $vtodo_array = $todo; --- 819,823 ---- // --></script>"; ! $todo .= '<a class="psf" title="'.@$title.'" href="#" onclick="openTodoInfo('.$todo_popup_data_index.'); return false;">'; $todo_popup_data_index++; $vtodo_array = $todo; *************** *** 1016,1020 **** $start_date = localizeDate ($dateFormat_week_list, $u_start); foreach ($event_times as $uid => $val) { ! if (isset($seen_events[$uid]) && $val['spans_day'] == 1) continue; $seen_events[$uid] = 1; $switch['CAL'] = $cal; --- 1023,1027 ---- $start_date = localizeDate ($dateFormat_week_list, $u_start); foreach ($event_times as $uid => $val) { ! if (isset($seen_events[$uid]) && @$val['spans_day'] == 1) continue; $seen_events[$uid] = 1; $switch['CAL'] = $cal; |