diff options
author | Jim Hu <jimhu@users.sourceforge.net> | 2005-11-27 07:56:31 +0000 |
---|---|---|
committer | Jim Hu <jimhu@users.sourceforge.net> | 2005-11-27 07:56:31 +0000 |
commit | 6b786f6023ec8ff6e8ece7b352d0fa95b7946e02 (patch) | |
tree | e74866aa5ca8d090b2c8922fb301d3829d0407fc /functions/init.inc.php | |
parent | 561a87eeef31ad4927e20aec1be00d7a58ecf08b (diff) | |
download | phpicalendar-6b786f6023ec8ff6e8ece7b352d0fa95b7946e02.tar.gz phpicalendar-6b786f6023ec8ff6e8ece7b352d0fa95b7946e02.tar.bz2 phpicalendar-6b786f6023ec8ff6e8ece7b352d0fa95b7946e02.zip |
patches to fix several files to work better with cookies. Changes in preferences.php, preferencees.tpl, init.inc.php
Diffstat (limited to 'functions/init.inc.php')
-rw-r--r-- | functions/init.inc.php | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/functions/init.inc.php b/functions/init.inc.php index d7d0dc4..60a6633 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -15,23 +15,31 @@ $ALL_CALENDARS_COMBINED = 'all_calendars_combined971'; if (!defined('BASE')) define('BASE', './'); 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_cpath'])) $default_cpath_check = $phpicalendar['cookie_cpath']; if (isset($phpicalendar['cookie_view'])) $default_view = $phpicalendar['cookie_view']; - if (isset($phpicalendar['cookie_style'])) $style_sheet = $phpicalendar['cookie_style']; + 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. if ($cookie_uri == '') { |