|
From: <cl...@us...> - 2003-02-16 03:40:54
|
Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv32709/functions
Modified Files:
init.inc.php
Log Message:
Fixed a bug allowing a bad cookie to fail to error page, instead now just loads defualt calendar.
Index: init.inc.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** init.inc.php 19 Nov 2002 05:46:02 -0000 1.26
--- init.inc.php 16 Feb 2003 03:40:51 -0000 1.27
***************
*** 15,19 ****
$phpicalendar = unserialize(stripslashes($HTTP_COOKIE_VARS['phpicalendar']));
if (isset($phpicalendar['cookie_language'])) $language = $phpicalendar['cookie_language'];
! if (isset($phpicalendar['cookie_calendar'])) $default_cal = $phpicalendar['cookie_calendar'];
if (isset($phpicalendar['cookie_view'])) $default_view = $phpicalendar['cookie_view'];
if (isset($phpicalendar['cookie_style'])) $style_sheet = $phpicalendar['cookie_style'];
--- 15,19 ----
$phpicalendar = unserialize(stripslashes($HTTP_COOKIE_VARS['phpicalendar']));
if (isset($phpicalendar['cookie_language'])) $language = $phpicalendar['cookie_language'];
! if (isset($phpicalendar['cookie_calendar'])) $default_cal_check = $phpicalendar['cookie_calendar'];
if (isset($phpicalendar['cookie_view'])) $default_view = $phpicalendar['cookie_view'];
if (isset($phpicalendar['cookie_style'])) $style_sheet = $phpicalendar['cookie_style'];
***************
*** 62,66 ****
}
} else {
! $cal_filename = $default_cal;
}
--- 62,72 ----
}
} else {
! $calcheck = $calendar_path.'/'.$default_cal_check.'.ics';
! $calcheckopen = @fopen($calcheck, "r");
! if ($calcheckopen == FALSE) {
! $cal_filename = $default_cal;
! } else {
! $cal_filename = $default_cal_check;
! }
}
|