From: <cl...@us...> - 2003-08-13 05:37:39
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1:/tmp/cvs-serv27111/functions Modified Files: ical_parser.php init.inc.php Log Message: Bug fixes, prepped for 0.9.3, added webcal as default support, fixed extra <BR> tags. Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** ical_parser.php 30 Jun 2003 22:48:25 -0000 1.92 --- ical_parser.php 13 Aug 2003 05:37:36 -0000 1.93 *************** *** 571,575 **** } $master_array['-2']["$vtodo_sort"]["$uid"] = array ('start_date' => $start_date, 'start_time' => $start_time, 'vtodo_text' => $summary, 'due_date'=> $due_date, 'due_time'=> $due_time, 'completed_date' => $completed_date, 'completed_time' => $completed_time, 'priority' => $vtodo_priority, 'status' => $status, 'class' => $class, 'categories' => $vtodo_categories); ! unset ($due_date, $due_time, $completed_date, $completed_time, $vtodo_priority, $status, $class, $vtodo_categories, $summary); $vtodo_set = FALSE; } elseif ($line == 'BEGIN:VTODO') { --- 571,575 ---- } $master_array['-2']["$vtodo_sort"]["$uid"] = array ('start_date' => $start_date, 'start_time' => $start_time, 'vtodo_text' => $summary, 'due_date'=> $due_date, 'due_time'=> $due_time, 'completed_date' => $completed_date, 'completed_time' => $completed_time, 'priority' => $vtodo_priority, 'status' => $status, 'class' => $class, 'categories' => $vtodo_categories); ! unset ($start_date, $start_time, $due_date, $due_time, $completed_date, $completed_time, $vtodo_priority, $status, $class, $vtodo_categories, $summary); $vtodo_set = FALSE; } elseif ($line == 'BEGIN:VTODO') { *************** *** 922,926 **** break; case 'LOCATION': ! $data = $location; break; } --- 922,926 ---- break; case 'LOCATION': ! $location = $data; break; } Index: init.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** init.inc.php 30 Jun 2003 22:48:25 -0000 1.33 --- init.inc.php 13 Aug 2003 05:37:36 -0000 1.34 *************** *** 52,64 **** $is_webcal = FALSE; if (isset($HTTP_GET_VARS['cal']) && $HTTP_GET_VARS['cal'] != '') { ! $cal_decoded = urldecode($HTTP_GET_VARS['cal']); ! if (substr($cal_decoded, 0, 7) == 'http://' || substr($cal_decoded, 0, 9) == 'webcal://') { ! $is_webcal = TRUE; ! $cal_webcalPrefix = str_replace('http://','webcal://',$cal_decoded); ! $cal_httpPrefix = str_replace('webcal://','http://',$cal_decoded); ! $cal_filename = $cal_httpPrefix; ! } else { ! $cal_filename = stripslashes($cal_decoded); ! } } else { if (isset($default_cal_check)) { --- 52,56 ---- $is_webcal = FALSE; if (isset($HTTP_GET_VARS['cal']) && $HTTP_GET_VARS['cal'] != '') { ! $cal_filename = urldecode($HTTP_GET_VARS['cal']); } else { if (isset($default_cal_check)) { *************** *** 79,82 **** --- 71,80 ---- } + if (substr($cal_filename, 0, 7) == 'http://' || substr($cal_filename, 0, 9) == 'webcal://') { + $is_webcal = TRUE; + $cal_webcalPrefix = str_replace('http://','webcal://',$cal_filename); + $cal_httpPrefix = str_replace('webcal://','http://',$cal_filename); + $cal_filename = $cal_httpPrefix; + } if ($is_webcal) { *************** *** 86,89 **** --- 84,90 ---- $filename = $cal_filename; $subscribe_path = $cal_webcalPrefix; + // empty the filelist array + $cal_filelist = array(); + array_push($cal_filelist,$filename); } else { exit(error($error_remotecal_lang, $HTTP_GET_VARS['cal'])); *************** *** 111,114 **** --- 112,121 ---- } } + // add webcals + foreach ($list_webcals as $file) { + if (substr($file, -4) == ".ics") { + array_push($cal_filelist, $file); + } + } natcasesort($cal_filelist); } else { // Handle a single file *************** *** 140,142 **** } } ! ?> \ No newline at end of file --- 147,149 ---- } } ! ?> |