alecpl
2009-09-25 7d51781450910d8347926492cfcdff7d0f43e8c0
program/include/session.inc
@@ -65,8 +65,13 @@
  
  $now = $DB->fromunixtime(time());
  if ($oldvars = rcube_sess_read($key)) {
    $a_oldvars = rcube_sess_unserialize($oldvars);
  $sql_result = $DB->query(
    "SELECT vars FROM " . get_table_name('session') . "
     WHERE  sess_id=?", $key);
  if ($sql_arr = $DB->fetch_assoc($sql_result)) {
    $a_oldvars = rcube_sess_unserialize($sql_arr['vars']);
    foreach ((array)$GLOBALS['rcube_session_unsets'] as $k)
      unset($a_oldvars[$k]);
@@ -240,7 +245,7 @@
  $randval = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
  for ($random = "", $i=1; $i <= 32; $i++) {
    $random .= substr($randval, rand(0,(strlen($randval) - 1)), 1);
    $random .= substr($randval, mt_rand(0,(strlen($randval) - 1)), 1);
  }
  // use md5 value for id or remove capitals from string $randval