Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6132/phpicalendar/functions
Modified Files:
init.inc.php
Log Message:
patches to fix several files to work better with cookies. Changes in preferences.php, preferencees.tpl, init.inc.php
Index: init.inc.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** init.inc.php 24 Nov 2005 04:28:34 -0000 1.77
--- init.inc.php 27 Nov 2005 07:56:31 -0000 1.78
***************
*** 16,36 ****
include_once(BASE.'config.inc.php');
include_once(BASE.'error.php');
- if($_REQUEST['cpath']){
- $cpath = $_REQUEST['cpath'];
- $calendar_path .= "/$cpath";
- $tmp_dir .= "/$cpath";
- }
- include_once(BASE.'functions/calendar_functions.php');
- include_once(BASE.'functions/userauth_functions.php');
if (isset($_COOKIE['phpicalendar'])) {
$phpicalendar = unserialize(stripslashes($_COOKIE['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'];
if (isset($phpicalendar['cookie_startday'])) $week_start_day = $phpicalendar['cookie_startday'];
if (isset($phpicalendar['cookie_time'])) $day_start = $phpicalendar['cookie_time'];
}
// Set the cookie URI.
--- 16,44 ----
include_once(BASE.'config.inc.php');
include_once(BASE.'error.php');
if (isset($_COOKIE['phpicalendar'])) {
$phpicalendar = unserialize(stripslashes($_COOKIE['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_cpath'])) $default_cpath_check = $phpicalendar['cookie_cpath'];
if (isset($phpicalendar['cookie_view'])) $default_view = $phpicalendar['cookie_view'];
! if (isset($phpicalendar['cookie_style'])) $template = $phpicalendar['cookie_style'];
if (isset($phpicalendar['cookie_startday'])) $week_start_day = $phpicalendar['cookie_startday'];
if (isset($phpicalendar['cookie_time'])) $day_start = $phpicalendar['cookie_time'];
}
+ if($_REQUEST['cpath']){
+ $cpath = $_REQUEST['cpath'];
+ $calendar_path .= "/$cpath";
+ $tmp_dir .= "/$cpath";
+ }elseif(isset($default_cpath_check)){
+ $cpath = $default_cpath_check;
+ $calendar_path .= "/$cpath";
+ $tmp_dir .= "/$cpath";
+ }
+
+ #these need cpath to be set
+ include_once(BASE.'functions/calendar_functions.php');
+ include_once(BASE.'functions/userauth_functions.php');
+
// Set the cookie URI.
|