From afe581186d6bd59ea42e5dfa3ce47ab6705b9409 Mon Sep 17 00:00:00 2001 From: Wesley Miaw Date: Sat, 20 Sep 2003 00:16:05 +0000 Subject: Set magic string $ALL_CALENDARS_COMBINED = 'all_calendars_combined971'. All previous references to 'all_calendars_combined971' now point at $ALL_CALENDARS_COMBINED. Uncommented closing form tag on sidebar.php, and set correct spacing for the entire sidebar. --- functions/ical_parser.php | 6 +++--- functions/init.inc.php | 7 ++++--- functions/list_icals.php | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'functions') diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 2a32b94..4798685 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -31,7 +31,7 @@ $this_year = $day_array2[1]; // reading the file if it's allowed $parse_file = true; -if (($is_webcal == false) && ($save_parsed_cals == 'yes') && ($cal != 'all_calenders_combined971')) { +if (($is_webcal == false) && ($save_parsed_cals == 'yes') && ($cal != $ALL_CALENDARS_COMBINED)) { $realcal_mtime = filemtime($filename); $parsedcal = $tmp_dir.'/parsedcal-'.$cal_filename.'-'.$this_year; if (file_exists($parsedcal)) { @@ -967,7 +967,7 @@ if ($parse_file) { } // 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') { + if (isset($master_array) && is_array($master_array) && $save_parsed_cals == 'yes' && $is_webcal == FALSE && $cal != $ALL_CALENDARS_COMBINED) { $write_me = serialize($master_array); $fd = fopen($parsedcal, 'w'); fwrite($fd, $write_me); @@ -989,7 +989,7 @@ if ($parse_file) { //print ''; // Set a calender name for all calenders combined -if ($cal == 'all_calenders_combined971') { +if ($cal == $ALL_CALENDARS_COMBINED) { $calendar_name = $all_cal_comb_lang; } diff --git a/functions/init.inc.php b/functions/init.inc.php index 669b716..2d4517c 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -8,6 +8,7 @@ // uncomment when developing, comment for shipping version //error_reporting (E_ALL); +$ALL_CALENDARS_COMBINED = 'all_calendars_combined971'; if (!defined('BASE')) define('BASE', './'); include(BASE.'config.inc.php'); include(BASE.'functions/error.php'); @@ -54,7 +55,7 @@ if (isset($HTTP_GET_VARS['cal']) && $HTTP_GET_VARS['cal'] != '') { $cal_filename = urldecode($HTTP_GET_VARS['cal']); } else { if (isset($default_cal_check)) { - if ($default_cal_check != 'all_calenders_combined971') { + if ($default_cal_check != $ALL_CALENDARS_COMBINED) { $calcheck = $calendar_path.'/'.$default_cal_check.'.ics'; $calcheckopen = @fopen($calcheck, "r"); if ($calcheckopen == FALSE) { @@ -63,7 +64,7 @@ if (isset($HTTP_GET_VARS['cal']) && $HTTP_GET_VARS['cal'] != '') { $cal_filename = $default_cal_check; } } else { - $cal_filename = 'all_calenders_combined971'; + $cal_filename = $ALL_CALENDARS_COMBINED; } } else { $cal_filename = $default_cal; @@ -98,7 +99,7 @@ if ($is_webcal) { if (!isset($filename)) { // empty the filelist array $cal_filelist = array(); - if ($cal == 'all_calenders_combined971') { // Create an array with the paths to all files to be combined + if ($cal == $ALL_CALENDARS_COMBINED) { // Create an array with the paths to all files to be combined // Note: code here is similar to code in list_icals.php // open directory $dir_handle = @opendir($calendar_path) or die(error(sprintf($error_path_lang, $calendar_path), $cal_filename)); diff --git a/functions/list_icals.php b/functions/list_icals.php index 904b74a..43b476a 100644 --- a/functions/list_icals.php +++ b/functions/list_icals.php @@ -38,10 +38,10 @@ if ($display_ical_list == "yes") { } // option to open all (non-web) calenders together - if ($cal == 'all_calenders_combined971') { - print ""; + if ($cal == $ALL_CALENDARS_COMBINED) { + print ""; } else { - print ""; + print ""; } foreach($list_webcals as $cal_tmp) { -- cgit v1.2.3