|
From: <cl...@us...> - 2004-05-23 05:36:39
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28302/functions Modified Files: ical_parser.php template.php Log Message: Fix for day_start missing, week not listed cals. Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -d -r1.166 -r1.167 *** ical_parser.php 20 May 2004 20:47:58 -0000 1.166 --- ical_parser.php 23 May 2004 05:36:30 -0000 1.167 *************** *** 1106,1110 **** //print '<pre>'; ! //print_r($master_array); //print_r($overlap_array); //print_r($day_array); --- 1106,1110 ---- //print '<pre>'; ! //print_r($master_array[20040529]); //print_r($overlap_array); //print_r($day_array); Index: template.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** template.php 20 May 2004 04:15:19 -0000 1.45 --- template.php 23 May 2004 05:36:30 -0000 1.46 *************** *** 77,81 **** function draw_week($template_p) { ! global $start_week_time, $template, $getdate, $cal, $master_array, $daysofweek_lang, $week_start_day, $dateFormat_week_list, $current_view, $day_array, $timeFormat, $gridLength, $timeFormat_small; // Figure out colspans --- 77,81 ---- function draw_week($template_p) { ! global $start_week_time, $template, $getdate, $cal, $master_array, $daysofweek_lang, $week_start_day, $dateFormat_week_list, $current_view, $day_array, $timeFormat, $gridLength, $timeFormat_small, $day_start; // Figure out colspans *************** *** 252,259 **** if (sizeof($event_length[$thisday]) == 0) { if ($dayborder == 0) { ! $class = " class=\"weekborder\""; $dayborder++; } else { ! $class = ""; $dayborder = 0; } --- 252,259 ---- if (sizeof($event_length[$thisday]) == 0) { if ($dayborder == 0) { ! $class = ' class="weekborder"'; $dayborder++; } else { ! $class = ''; $dayborder = 0; } *************** *** 261,265 **** $drawWidth = 1; $colspan_width = round((80 / $nbrGridCols[$thisday]) * $drawWidth); ! $weekdisplay .= "<td width=\"$colspan_width\" colspan=\"" . $nbrGridCols[$thisday] . "\" $class> </td>\n"; } else { --- 261,265 ---- $drawWidth = 1; $colspan_width = round((80 / $nbrGridCols[$thisday]) * $drawWidth); ! $weekdisplay .= '<td width="' . $colspan_width . '" colspan="' . $nbrGridCols[$thisday] . '" ' . $class . '> </td>'."\n"; } else { *************** *** 272,278 **** case "begin": $event_length[$thisday][$i]["state"] = "started"; ! $event_start = $this_time_arr[($event_length[$thisday][$i]["key"])]["start_unixtime"]; $event_start = date ($timeFormat_small, $event_start); ! $event_calno = $this_time_arr[($event_length[$thisday][$i]['key'])]['calnumber']; $event_status = strtolower($this_time_arr[($event_length[$thisday][$i]['key'])]['status']); if ($event_calno < 1) $event_calno = 1; --- 272,280 ---- case "begin": $event_length[$thisday][$i]["state"] = "started"; ! $event_start = $this_time_arr[($event_length[$thisday][$i]["key"])]['start_unixtime']; $event_start = date ($timeFormat_small, $event_start); ! $event_calno = $this_time_arr[($event_length[$thisday][$i]['key'])]['calnumber']; ! $event_calna = $this_time_arr[($event_length[$thisday][$i]['key'])]['calname']; ! $event_url = $this_time_arr[($event_length[$thisday][$i]['key'])]['url']; $event_status = strtolower($this_time_arr[($event_length[$thisday][$i]['key'])]['status']); if ($event_calno < 1) $event_calno = 1; *************** *** 290,295 **** // Start drawing the event $event_temp = $loop_event; - $event_calna = $this_time_arr[($event_length[$i]['key'])]['calname']; - $event_url = $this_time_arr[($event_length[$i]['key'])]['url']; $event = openevent($event_calna, $event_start, $event_end, $this_time_arr[($event_length[$thisday][$i]["key"])], $week_events_lines, 25, '', '', 'ps', $event_url); $event_temp = str_replace('{EVENT}', $event, $event_temp); --- 292,295 ---- *************** *** 333,337 **** function draw_day($template_p) { ! global $template, $getdate, $cal, $master_array, $daysofweek_lang, $week_start_day, $dateFormat_week_list, $current_view, $day_array, $timeFormat, $gridLength; // Replaces the allday events --- 333,337 ---- function draw_day($template_p) { ! global $template, $getdate, $cal, $master_array, $daysofweek_lang, $week_start_day, $dateFormat_week_list, $current_view, $day_array, $timeFormat, $gridLength, $day_start; // Replaces the allday events *************** *** 422,426 **** // add events that overlap $day_start instead of cutting them out completely ! if ("$day_start" == "$cal_time" && isset($master_array[$getdate])) { foreach($master_array[$getdate] as $time_key => $time_arr) { if ((int)$time_key < (int)$cal_time && is_array($time_arr) && $time_key != '-1') { --- 422,426 ---- // add events that overlap $day_start instead of cutting them out completely ! if (($day_start == $cal_time) && (isset($master_array[$getdate]))) { foreach($master_array[$getdate] as $time_key => $time_arr) { if ((int)$time_key < (int)$cal_time && is_array($time_arr) && $time_key != '-1') { |