From aa3869c95eddd0bdde4c985771cda50223a34e98 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 2 Sep 2004 18:39:51 +0000 Subject: Updated to $_COOKIE --- functions/init.inc.php | 4 ++-- functions/userauth_functions.php | 6 +++--- index.php | 4 ++-- preferences.php | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/functions/init.inc.php b/functions/init.inc.php index fde7237..7cbfd55 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -17,8 +17,8 @@ include_once(BASE.'config.inc.php'); include_once(BASE.'functions/error.php'); include_once(BASE.'functions/calendar_functions.php'); include_once(BASE.'functions/userauth_functions.php'); -if (isset($HTTP_COOKIE_VARS['phpicalendar'])) { - $phpicalendar = unserialize(stripslashes($HTTP_COOKIE_VARS['phpicalendar'])); +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']; diff --git a/functions/userauth_functions.php b/functions/userauth_functions.php index 4fe04fb..7a408da 100644 --- a/functions/userauth_functions.php +++ b/functions/userauth_functions.php @@ -43,7 +43,7 @@ function logout_querys() { // if no valid login is found. Returns a boolean invalid_login to // indicate that the login is invalid. function user_login() { - global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $HTTP_POST_VARS, $_SERVER; + global $_COOKIE, $HTTP_GET_VARS, $HTTP_POST_VARS, $_SERVER; global $login_cookies, $cookie_uri, $locked_map; // Initialize return values. @@ -57,9 +57,9 @@ function user_login() { // Look for a login cookie. if ($login_cookies == 'yes' && - isset($HTTP_COOKIE_VARS['phpicalendar_login'])) + isset($_COOKIE['phpicalendar_login'])) { - $login_cookie = unserialize(stripslashes($HTTP_COOKIE_VARS['phpicalendar_login'])); + $login_cookie = unserialize(stripslashes($_COOKIE['phpicalendar_login'])); if (isset($login_cookie['username']) && isset($login_cookie['password'])) { diff --git a/index.php b/index.php index c49ac4e..13d55f2 100644 --- a/index.php +++ b/index.php @@ -2,8 +2,8 @@ if (!isset($ALL_CALENDARS_COMBINED)) $ALL_CALENDARS_COMBINED = 'all_calendars_combined971'; include "./config.inc.php"; -if (isset($HTTP_COOKIE_VARS['phpicalendar'])) { - $phpicalendar = unserialize(stripslashes($HTTP_COOKIE_VARS['phpicalendar'])); +if (isset($_COOKIE['phpicalendar'])) { + $phpicalendar = unserialize(stripslashes($_COOKIE['phpicalendar'])); $default_view = $phpicalendar['cookie_view']; } if ($printview_default == 'yes') { diff --git a/preferences.php b/preferences.php index 0d8badc..253a8d7 100644 --- a/preferences.php +++ b/preferences.php @@ -37,11 +37,11 @@ if ($action == 'setcookie') { } else { setcookie("phpicalendar","$the_cookie",time()+(60*60*24*7*12*10) ,"/","$cookie_uri",0); } - $HTTP_COOKIE_VARS['phpicalendar'] = $the_cookie; + $_COOKIE['phpicalendar'] = $the_cookie; } -if (isset($HTTP_COOKIE_VARS['phpicalendar'])) { - $phpicalendar = unserialize(stripslashes($HTTP_COOKIE_VARS['phpicalendar'])); +if (isset($_COOKIE['phpicalendar'])) { + $phpicalendar = unserialize(stripslashes($_COOKIE['phpicalendar'])); $cookie_language = $phpicalendar['cookie_language']; $cookie_calendar = $phpicalendar['cookie_calendar']; $cookie_view = $phpicalendar['cookie_view']; @@ -53,7 +53,7 @@ if (isset($HTTP_COOKIE_VARS['phpicalendar'])) { } } -if ((!isset($HTTP_COOKIE_VARS['phpicalendar'])) || ($cookie_unset)) { +if ((!isset($_COOKIE['phpicalendar'])) || ($cookie_unset)) { # No cookie set -> use defaults from config file. $cookie_language = ucfirst($language); $cookie_calendar = $default_cal; -- cgit v1.2.3