Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21007/phpicalendar/functions Modified Files: date_functions.php ical_parser.php init.inc.php overlapping_events.php template.php Log Message: changes to fix several warnings and notices Index: date_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/date_functions.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** date_functions.php 23 Feb 2006 22:36:04 -0000 1.32 --- date_functions.php 16 Mar 2006 00:28:54 -0000 1.33 *************** *** 220,226 **** unset($unixtime, $date, $time, $allday); ! // What the heck is this doing in here? ! #$data = str_replace ('/softwarestudio.org/Olson_20011030_5/', '', $data); ! // Check for zulu time. $zulu_time = false; --- 220,224 ---- unset($unixtime, $date, $time, $allday); ! $allday =''; #suppress error on returning undef. // Check for zulu time. $zulu_time = false; Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.202 retrieving revision 1.203 diff -C2 -d -r1.202 -r1.203 *** ical_parser.php 8 Feb 2006 09:07:02 -0000 1.202 --- ical_parser.php 16 Mar 2006 00:28:54 -0000 1.203 *************** *** 105,111 **** // Let's see if we're doing a webcal ! $is_webcal == FALSE; if (substr($filename, 0, 7) == 'http://' || substr($filename, 0, 8) == 'https://' || substr($filename, 0, 9) == 'webcal://') { ! $is_webcal == TRUE; $cal_webcalPrefix = str_replace('http://','webcal://',$filename); $cal_httpPrefix = str_replace('webcal://','http://',$filename); --- 105,111 ---- // Let's see if we're doing a webcal ! $is_webcal = FALSE; if (substr($filename, 0, 7) == 'http://' || substr($filename, 0, 8) == 'https://' || substr($filename, 0, 9) == 'webcal://') { ! $is_webcal = TRUE; $cal_webcalPrefix = str_replace('http://','webcal://',$filename); $cal_httpPrefix = str_replace('webcal://','http://',$filename); *************** *** 328,332 **** } ! $master_array[$start_date_tmp][$time_tmp][$uid] = array ('event_start' => $start_time_tmp, 'event_end' => $end_time_tmp, 'display_end' => $display_end_tmp, 'start_unixtime' => $start_unixtime, 'end_unixtime' => $end_unixtime, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => 0, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => true, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url ); checkOverlap($start_date_tmp, $time_tmp, $uid); $start_tmp = strtotime('+1 day',$start_tmp); --- 328,352 ---- } ! $master_array[$start_date_tmp][$time_tmp][$uid] = array ( ! 'event_start' => $start_time_tmp, ! 'event_end' => $end_time_tmp, ! 'start_unixtime' => $start_unixtime, ! 'end_unixtime' => $end_unixtime, ! 'event_text' => $summary, ! 'event_length' => $length, ! 'event_overlap' => 0, ! 'description' => $description, ! 'status' => $status, ! 'class' => $class, ! 'spans_day' => true, ! 'location' => $location, ! 'organizer' => serialize($organizer), ! 'attendee' => serialize($attendee), ! 'calnumber' => $calnumber, ! 'calname' => $actual_calname, ! 'url' => $url ); ! if (isset($display_end_tmp)){ ! $master_array[$start_date_tmp][$time_tmp][$uid]['display_end'] = $display_end_tmp; ! } checkOverlap($start_date_tmp, $time_tmp, $uid); $start_tmp = strtotime('+1 day',$start_tmp); *************** *** 343,347 **** // This if statement should prevent writing of an excluded date if its the first recurrance - CL if (!in_array($start_date, $except_dates)) { ! $master_array[($start_date)][($hour.$minute)][$uid] = array ('event_start' => $start_time, 'event_end' => $end_time_tmp1, 'display_end' => $display_end_tmp, 'start_unixtime' => $start_unixtime, 'end_unixtime' => $end_unixtime, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => 0, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => false, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url ); checkOverlap($start_date, ($hour.$minute), $uid); if (!$write_processed) $master_array[($start_date)][($hour.$minute)][$uid]['exception'] = true; --- 363,387 ---- // This if statement should prevent writing of an excluded date if its the first recurrance - CL if (!in_array($start_date, $except_dates)) { ! $master_array[($start_date)][($hour.$minute)][$uid] = array ( ! 'event_start' => $start_time, ! 'event_end' => $end_time_tmp1, ! 'start_unixtime' => $start_unixtime, ! 'end_unixtime' => $end_unixtime, ! 'event_text' => $summary, ! 'event_length' => $length, ! 'event_overlap' => 0, ! 'description' => $description, ! 'status' => $status, ! 'class' => $class, ! 'spans_day' => false, ! 'location' => $location, ! 'organizer' => serialize($organizer), ! 'attendee' => serialize($attendee), ! 'calnumber' => $calnumber, ! 'calname' => $actual_calname, ! 'url' => $url ); ! if (isset($display_end_tmp)){ ! $master_array[($start_date)][($hour.$minute)][$uid]['display_end'] = $display_end_tmp; ! } checkOverlap($start_date, ($hour.$minute), $uid); if (!$write_processed) $master_array[($start_date)][($hour.$minute)][$uid]['exception'] = true; *************** *** 705,709 **** $until_check = $start_date_tmp.$time_tmp.'00'; if ($abs_until > $until_check) { ! $master_array[$start_date_tmp][$time_tmp][$uid] = array ('event_start' => $start_time_tmp, 'event_end' => $end_time_tmp, 'display_end' => $display_end_tmp, 'start_unixtime' => $start_unixtime_tmp, 'end_unixtime' => $end_unixtime_tmp, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => 0, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => true, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url, 'recur' => $recur); checkOverlap($start_date_tmp, $time_tmp, $uid); } --- 745,770 ---- $until_check = $start_date_tmp.$time_tmp.'00'; if ($abs_until > $until_check) { ! $master_array[$start_date_tmp][$time_tmp][$uid] = array ( ! 'event_start' => $start_time_tmp, ! 'event_end' => $end_time_tmp, ! 'start_unixtime' => $start_unixtime_tmp, ! 'end_unixtime' => $end_unixtime_tmp, ! 'event_text' => $summary, ! 'event_length' => $length, ! 'event_overlap' => 0, ! 'description' => $description, ! 'status' => $status, ! 'class' => $class, ! 'spans_day' => true, ! 'location' => $location, ! 'organizer' => serialize($organizer), ! 'attendee' => serialize($attendee), ! 'calnumber' => $calnumber, ! 'calname' => $actual_calname, ! 'url' => $url, ! 'recur' => $recur); ! if (isset($display_end_tmp)){ ! $master_array[$start_date_tmp][$time_tmp][$uid]['display_end'] = $display_end_tmp; ! } checkOverlap($start_date_tmp, $time_tmp, $uid); } *************** *** 721,725 **** $until_check = $recur_data_date.$hour.$minute.'00'; if ($abs_until > $until_check) { ! $master_array[($recur_data_date)][($hour.$minute)][$uid] = array ('event_start' => $start_time, 'event_end' => $end_time_tmp1, 'display_end' => $display_end_tmp, 'start_unixtime' => $start_unixtime_tmp, 'end_unixtime' => $end_unixtime_tmp, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => 0, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => false, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url, 'recur' => $recur); checkOverlap($recur_data_date, ($hour.$minute), $uid); } --- 782,807 ---- $until_check = $recur_data_date.$hour.$minute.'00'; if ($abs_until > $until_check) { ! $master_array[($recur_data_date)][($hour.$minute)][$uid] = array ( ! 'event_start' => $start_time, ! 'event_end' => $end_time_tmp1, ! 'start_unixtime' => $start_unixtime_tmp, ! 'end_unixtime' => $end_unixtime_tmp, ! 'event_text' => $summary, ! 'event_length' => $length, ! 'event_overlap' => 0, ! 'description' => $description, ! 'status' => $status, ! 'class' => $class, ! 'spans_day' => false, ! 'location' => $location, ! 'organizer' => serialize($organizer), ! 'attendee' => serialize($attendee), ! 'calnumber' => $calnumber, ! 'calname' => $actual_calname, ! 'url' => $url, ! 'recur' => $recur); ! if (isset($display_end_tmp)){ ! $master_array[($recur_data_date)][($hour.$minute)][$uid]['display_end'] = $display_end_tmp; ! } checkOverlap($recur_data_date, ($hour.$minute), $uid); } *************** *** 740,743 **** --- 822,826 ---- if (is_array($except_dates)) { foreach ($except_dates as $key => $value) { + if (isset ($master_array[$value])){ $time = $except_times[$key]; unset($master_array[$value][$time][$uid]); *************** *** 750,753 **** --- 833,837 ---- } } + } // Clear event data now that it's been saved. *************** *** 794,798 **** unset ($field, $data, $prop_pos, $property); ! ereg ("([^:]+):(.*)", $line, $line); $field = $line[1]; $data = $line[2]; --- 878,882 ---- unset ($field, $data, $prop_pos, $property); ! if (ereg ("([^:]+):(.*)", $line, $line)){ $field = $line[1]; $data = $line[2]; *************** *** 996,999 **** --- 1080,1084 ---- } } + } if (!isset($master_array['-3'][$calnumber])) $master_array['-3'][$calnumber] = $actual_calname; if (!isset($master_array['-4'][$calnumber]['mtime'])) $master_array['-4'][$calnumber]['mtime'] = $actual_mtime; Index: init.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** init.inc.php 16 Mar 2006 00:20:53 -0000 1.86 --- init.inc.php 16 Mar 2006 00:28:54 -0000 1.87 *************** *** 31,35 **** } $cpath = ''; #initialize cpath to prevent later undef warnings. ! if($_REQUEST['cpath']){ $cpath = str_replace('..','',$_REQUEST['cpath']); $calendar_path .= "/$cpath"; --- 31,35 ---- } $cpath = ''; #initialize cpath to prevent later undef warnings. ! if(isset($_REQUEST['cpath'])){ $cpath = str_replace('..','',$_REQUEST['cpath']); $calendar_path .= "/$cpath"; Index: overlapping_events.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/overlapping_events.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** overlapping_events.php 16 May 2005 18:05:29 -0000 1.13 --- overlapping_events.php 16 Mar 2006 00:28:54 -0000 1.14 *************** *** 111,115 **** function checkOverlap($event_date, $event_time, $uid) { global $master_array, $overlap_array; ! $event = $master_array[$event_date][$event_time][$uid]; // Copy out the array - we replace this at the end. --- 111,115 ---- function checkOverlap($event_date, $event_time, $uid) { global $master_array, $overlap_array; ! if (!isset($event_date)) return; $event = $master_array[$event_date][$event_time][$uid]; // Copy out the array - we replace this at the end. Index: template.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** template.php 15 Feb 2006 08:32:05 -0000 1.82 --- template.php 16 Mar 2006 00:28:55 -0000 1.83 *************** *** 908,912 **** $temp = $t_month[2]; } ! if ($master_array[$daylink]) { if ($type != 'small') { foreach ($master_array[$daylink] as $cal_time => $event_times) { --- 908,912 ---- $temp = $t_month[2]; } ! if (isset($master_array[$daylink])) { if ($type != 'small') { foreach ($master_array[$daylink] as $cal_time => $event_times) { |