diff options
author | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-12 06:37:29 +0000 |
---|---|---|
committer | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-12 06:37:29 +0000 |
commit | 1e5db3ceb99588223035c3ceed055bc03511e04b (patch) | |
tree | b5da5009a160657c762dd692bb7c1b98a6ac1f70 | |
parent | f624f9143722a6e32f702f6e75f24ae457f85d8c (diff) | |
download | phpicalendar-1e5db3ceb99588223035c3ceed055bc03511e04b.tar.gz phpicalendar-1e5db3ceb99588223035c3ceed055bc03511e04b.tar.bz2 phpicalendar-1e5db3ceb99588223035c3ceed055bc03511e04b.zip |
misc changes for new config model
-rw-r--r-- | functions/init/configs.php | 5 | ||||
-rw-r--r-- | preferences.php | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/functions/init/configs.php b/functions/init/configs.php index aa79610..8c47324 100644 --- a/functions/init/configs.php +++ b/functions/init/configs.php @@ -10,7 +10,7 @@ if ($phpiCal_config->cookie_uri == '') { } $cookie_name = 'phpicalendar_'.basename($phpiCal_config->default_path); if (isset($_COOKIE[$cookie_name]) && !isset($_POST['unset'])) { - $phpicalendar = unserialize(stripslashes($_COOKIE[$phpiCal_config->cookie_uri])); + $phpicalendar = unserialize(stripslashes($_COOKIE[$cookie_name])); if (isset($phpicalendar['cookie_language'])) $phpiCal_config->setProperty('language', $phpicalendar['cookie_language']); if (isset($phpicalendar['cookie_calendar'])) $phpiCal_config->setProperty('default_cal_check', $phpicalendar['cookie_calendar']); if (isset($phpicalendar['cookie_cpath'])) $phpiCal_config->setProperty('default_cpath_check', $phpicalendar['cookie_cpath']); @@ -19,7 +19,8 @@ if (isset($_COOKIE[$cookie_name]) && !isset($_POST['unset'])) { $phpiCal_config->setProperty('template', $phpicalendar['cookie_style']); } if (isset($phpicalendar['cookie_startday'])) $phpiCal_config->setProperty('week_start_day', $phpicalendar['cookie_startday']); - if (isset($phpicalendar['cookie_time'])) $phpiCal_config->setProperty('day_start', $phpicalendar['cookie_time']); echo "cookie!"; + if (isset($phpicalendar['cookie_time'])) $phpiCal_config->setProperty('day_start', $phpicalendar['cookie_time']); + echo "cookie!"; } # language support diff --git a/preferences.php b/preferences.php index 67c67a3..2016c40 100644 --- a/preferences.php +++ b/preferences.php @@ -3,7 +3,6 @@ define('BASE','./'); require_once(BASE.'functions/ical_parser.php'); require_once(BASE.'functions/template.php'); -header("Content-Type: text/html; charset=$charset"); $display_date = $preferences_lang; if ($phpiCal_config->allow_preferences != 'yes') { @@ -37,7 +36,7 @@ if ($action == 'setcookie') { if ($cookie_unset) { setcookie("$cookie_name","$the_cookie",time()-(60*60*24*7) ,"/","$phpiCal_config->cookie_uri",0); } else { - setcookie("$cookie_name","$the_cookie",time()+(60*60*24*7*12*10) ,"/","$phpiCal_config->cookie_uri",0); echo "setcookie"; + setcookie("$cookie_name","$the_cookie",time()+(60*60*24*7*12*10) ,"/","$phpiCal_config->cookie_uri",0); if (isset($_POST['cookie_view'])) $default_view = $_POST['cookie_view']; if (isset($_POST['cookie_style']) && is_dir(BASE.'templates/'.$_POST['cookie_style'].'/')) @@ -194,5 +193,5 @@ $page->replace_tags(array( )); $page->output(); - +print_r($_COOKIE[$cookie_name]); ?> |