equal
deleted
inserted
replaced
1047 } |
1047 } |
1048 else |
1048 else |
1049 { |
1049 { |
1050 // Stash it in a cookie |
1050 // Stash it in a cookie |
1051 // For now, make the cookie last forever, we can change this in 1.1.x |
1051 // For now, make the cookie last forever, we can change this in 1.1.x |
1052 setcookie( 'sid', $session_key, time()+315360000, scriptPath.'/' ); |
1052 setcookie( 'sid', $session_key, time()+315360000, scriptPath.'/', null, ( isset($_SERVER['HTTPS']) ) ); |
1053 $_COOKIE['sid'] = $session_key; |
1053 $_COOKIE['sid'] = $session_key; |
1054 } |
1054 } |
1055 // $keyhash is stored in the database, this is for compatibility with the older DB structure |
1055 // $keyhash is stored in the database, this is for compatibility with the older DB structure |
1056 $keyhash = md5($session_key); |
1056 $keyhash = md5($session_key); |
1057 // Record the user's IP |
1057 // Record the user's IP |