From fd5837eca1f02fb64c939e3c66c64c7959b219bb Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 15 Sep 2003 03:04:47 +0000 Subject: a --- config.inc.php | 2 +- functions/ical_parser.php | 40 ++++++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/config.inc.php b/config.inc.php index a3e9409..95f30f7 100644 --- a/config.inc.php +++ b/config.inc.php @@ -30,7 +30,7 @@ $cookie_uri = ''; // The HTTP URL to the PHP iCalendar directory, ie. htt $download_uri = ''; // The HTTP URL to your calendars directory, ie. http://www.example.com/phpicalendar/calendars // Yes/No questions --- 'yes' means Yes, anything else means no. 'yes' must be lowercase. -$save_parsed_cals = 'no'; // Recommended 'yes'. Saves a copy of the cal in /tmp after it's been parsed. Improves performence. +$save_parsed_cals = 'yes'; // Recommended 'yes'. Saves a copy of the cal in /tmp after it's been parsed. Improves performence. $use_sessions = 'no'; // This has not yet been implemented. $display_custom_goto = 'no'; // In the 'Jump To' box, display the custom 'go to day' box. $display_ical_list = 'yes'; // In the 'Jump To' box, display the pop-up menu with the list of all calendars in the $calendar_path directory. diff --git a/functions/ical_parser.php b/functions/ical_parser.php index c136ca4..319bf20 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -927,28 +927,28 @@ foreach ($cal_filelist as $filename) { if ($parse_file) { - // Sort the array by absolute date. - if (isset($master_array) && is_array($master_array)) { - ksort($master_array); - reset($master_array); - - // sort the sub (day) arrays so the times are in order - foreach (array_keys($master_array) as $k) { - if (isset($master_array[$k]) && is_array($master_array[$k])) { - ksort($master_array[$k]); - reset($master_array[$k]); - } - } - } + // Sort the array by absolute date. + if (isset($master_array) && is_array($master_array)) { + ksort($master_array); + reset($master_array); - // write the new master array to the file - if (isset($master_array) && is_array($master_array) && $save_parsed_cals == 'yes' && $is_webcal == FALSE) { - $write_me = serialize($master_array); - $fd = fopen($parsedcal, 'w'); - fwrite($fd, $write_me); - fclose($fd); - touch($parsedcal, $realcal_mtime); + // sort the sub (day) arrays so the times are in order + foreach (array_keys($master_array) as $k) { + if (isset($master_array[$k]) && is_array($master_array[$k])) { + ksort($master_array[$k]); + reset($master_array[$k]); + } } + } + + // write the new master array to the file + if (isset($master_array) && is_array($master_array) && $save_parsed_cals == 'yes' && $is_webcal == FALSE && $cal != 'all_calenders_combined971') { + $write_me = serialize($master_array); + $fd = fopen($parsedcal, 'w'); + fwrite($fd, $write_me); + fclose($fd); + touch($parsedcal, $realcal_mtime); + } } -- cgit v1.2.3