includes/sessions.php
changeset 204 473cc747022a
parent 193 ebe99e82a59a
parent 203 8e2fffc5c622
child 209 8a00247d1dee
equal deleted inserted replaced
193:ebe99e82a59a 204:473cc747022a
  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