equal
deleted
inserted
replaced
861 } |
861 } |
862 else |
862 else |
863 { |
863 { |
864 // Stash it in a cookie |
864 // Stash it in a cookie |
865 // For now, make the cookie last forever, we can change this in 1.1.x |
865 // For now, make the cookie last forever, we can change this in 1.1.x |
866 setcookie( 'sid', $session_key, time()+315360000, scriptPath.'/', null, ( isset($_SERVER['HTTPS']) ) ); |
866 setcookie( 'sid', $session_key, time()+315360000, scriptPath.'/', null, ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ) ); |
867 $_COOKIE['sid'] = $session_key; |
867 $_COOKIE['sid'] = $session_key; |
868 } |
868 } |
869 // $keyhash is stored in the database, this is for compatibility with the older DB structure |
869 // $keyhash is stored in the database, this is for compatibility with the older DB structure |
870 $keyhash = md5($session_key); |
870 $keyhash = md5($session_key); |
871 // Record the user's IP |
871 // Record the user's IP |