Update of /cvsroot/phplib/php-lib-stable/php
In directory usw-pr-cvs1:/tmp/cvs-serv12697
Modified Files:
session.inc
Log Message:
$newid now is a class variable, useful flag to incertept new session issuing
Index: session.inc
===================================================================
RCS file: /cvsroot/phplib/php-lib-stable/php/session.inc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** session.inc 19 Mar 2002 22:32:25 -0000 1.14
--- session.inc 29 May 2002 14:19:29 -0000 1.15
***************
*** 42,45 ****
--- 42,46 ----
var $name; ## Session name
var $id; ## Unique Session ID
+ var $newid; ## Newly Generated ID Flag
var $that;
***************
*** 87,96 ****
function get_id($id = "") {
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
! $newid=true;
$this->name = $this->cookiename==""?$this->classname:$this->cookiename;
if ( "" == $id ) {
! $newid=false;
switch ($this->mode) {
case "get":
--- 88,97 ----
function get_id($id = "") {
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
! $this->newid=true;
$this->name = $this->cookiename==""?$this->classname:$this->cookiename;
if ( "" == $id ) {
! $this->newid=false;
switch ($this->mode) {
case "get":
***************
*** 112,116 ****
if ( "" == $id ) {
! $newid=true;
$id = $this->that->ac_newid(md5(uniqid($this->magic)), $this->name);
}
--- 113,117 ----
if ( "" == $id ) {
! $this->newid=true;
$id = $this->that->ac_newid(md5(uniqid($this->magic)), $this->name);
}
***************
*** 118,122 ****
switch ($this->mode) {
case "cookie":
! if ( $newid && ( 0 == $this->lifetime ) ) {
SetCookie($this->name, $id, 0, "/", $this->cookie_domain);
}
--- 119,123 ----
switch ($this->mode) {
case "cookie":
! if ( $$this->newid && ( 0 == $this->lifetime ) ) {
SetCookie($this->name, $id, 0, "/", $this->cookie_domain);
}
|