aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorWesley Miaw <josuah@users.sourceforge.net>2003-09-20 00:16:05 +0000
committerWesley Miaw <josuah@users.sourceforge.net>2003-09-20 00:16:05 +0000
commitafe581186d6bd59ea42e5dfa3ce47ab6705b9409 (patch)
tree95c08cb2b0b622ebaec80937af6a088e6ff0a080 /functions
parent5acbcff92008621e2f50893be83d58385e00dd67 (diff)
downloadphpicalendar-afe581186d6bd59ea42e5dfa3ce47ab6705b9409.tar.gz
phpicalendar-afe581186d6bd59ea42e5dfa3ce47ab6705b9409.tar.bz2
phpicalendar-afe581186d6bd59ea42e5dfa3ce47ab6705b9409.zip
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.
Diffstat (limited to 'functions')
-rw-r--r--functions/ical_parser.php6
-rw-r--r--functions/init.inc.php7
-rw-r--r--functions/list_icals.php6
3 files changed, 10 insertions, 9 deletions
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 '</pre>';
// 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 "<option value=\"$current_view.php?cal=all_calenders_combined971\" selected>$all_cal_comb_lang</option>";
+ if ($cal == $ALL_CALENDARS_COMBINED) {
+ print "<option value=\"$current_view.php?cal=$ALL_CALENDARS_COMBINED\" selected>$all_cal_comb_lang</option>";
} else {
- print "<option value=\"$current_view.php?cal=all_calenders_combined971\">$all_cal_comb_lang</option>";
+ print "<option value=\"$current_view.php?cal=$ALL_CALENDARS_COMBINED\">$all_cal_comb_lang</option>";
}
foreach($list_webcals as $cal_tmp) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy