From cd1418522aef81f48a51ac6c317eb6c3ea9cadd0 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 13 Aug 2003 05:37:35 +0000 Subject: Bug fixes, prepped for 0.9.3, added webcal as default support, fixed extra
tags. --- README | 5 +++++ functions/ical_parser.php | 4 ++-- functions/init.inc.php | 27 +++++++++++++++++---------- includes/event.php | 3 --- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/README b/README index 77f1a55..c9dc6b3 100644 --- a/README +++ b/README @@ -72,6 +72,11 @@ COPYING for more information about our license. Changes: -------- +0.9.3 + -Multiple calendar support (up to 8). + -Fixed pesky
tags in event popup. + -Added Esperanto language. + -Major bug fixes. 0.9.2 -Fixed an extra .php on the preferences page. -Increased validations on many pages. diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 98a1305..9dc4e61 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -570,7 +570,7 @@ foreach ($cal_filelist as $filename) { $vtodo_sort = $vtodo_priority; } $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); + 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') { $vtodo_set = TRUE; @@ -921,7 +921,7 @@ foreach ($cal_filelist as $filename) { $organizer[] = array ('name' => $field, 'email' => $data); break; case 'LOCATION': - $data = $location; + $location = $data; break; } } diff --git a/functions/init.inc.php b/functions/init.inc.php index 3033e76..db76044 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -51,15 +51,7 @@ if ($calendar_path == '') { $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); - } + $cal_filename = urldecode($HTTP_GET_VARS['cal']); } else { if (isset($default_cal_check)) { if ($default_cal_check != 'all_calenders_combined971') { @@ -78,6 +70,12 @@ if (isset($HTTP_GET_VARS['cal']) && $HTTP_GET_VARS['cal'] != '') { } } +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) { if ($allow_webcals == 'yes' || in_array($cal_webcalPrefix, $list_webcals) || in_array($cal_httpPrefix, $list_webcals)) { @@ -85,6 +83,9 @@ if ($is_webcal) { $cal = urlencode($cal_filename); $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'])); } @@ -110,6 +111,12 @@ if ($is_webcal) { array_push($cal_filelist, $file); } } + // 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 $filename = $calendar_path.'/'.$cal_filename.'.ics'; @@ -139,4 +146,4 @@ if ($is_webcal) { } } -?> \ No newline at end of file +?> diff --git a/includes/event.php b/includes/event.php index bb7c2a8..a98cd8d 100644 --- a/includes/event.php +++ b/includes/event.php @@ -55,7 +55,6 @@ if (isset($HTTP_GET_VARS['attendee']) && ($HTTP_GET_VARS['attendee'] !== '') ) { $event = rawurldecode($event); $event = stripslashes($event); $event = str_replace('\\', '', $event); -$event = htmlspecialchars($event); $description = rawurldecode($description); $description = stripslashes($description); $description = str_replace('\\', '', $description); @@ -70,11 +69,9 @@ $attendee = unserialize ($attendee); $location = rawurldecode($location); $location = stripslashes($location); $location = str_replace('\\', '', $location); -//$description = htmlspecialchars($description); $calendar_name2 = rawurldecode($calendar_name); $calendar_name2 = stripslashes($calendar_name2); $calendar_name2 = str_replace('\\', '', $calendar_name2); -//$calendar_name2 = htmlspecialchars($calendar_name2); ?> -- cgit v1.2.3