[Phplib-commit] CVS: php-lib-stable/php session4.inc,1.2,1.3
Brought to you by:
nhruby,
richardarcher
From: Joe S. <joe...@us...> - 2002-11-08 18:33:00
|
Update of /cvsroot/phplib/php-lib-stable/php In directory usw-pr-cvs1:/tmp/cvs-serv28273/php-lib-stable/php Modified Files: session4.inc Log Message: php backwards compatibility in session4 freeze() and self_url() Index: session4.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/session4.inc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** session4.inc 1 Oct 2002 16:22:03 -0000 1.2 --- session4.inc 8 Nov 2002 18:32:58 -0000 1.3 *************** *** 382,388 **** // Remove existing session info from url $url = ereg_replace( ! "([&?])".quotemeta(urlencode($this->name))."=".$this->id."(&|$)", ! "\\1", $url); ! // Remove trailing ?/& if needed $url = ereg_replace("[&?]+$", "", $url); --- 382,386 ---- // Remove existing session info from url $url = ereg_replace( ! "([&?])".quotemeta(urlencode($this->name))."=(.)*(&|$)","\\1", $url); # we clean any(also bogus) sess in url // Remove trailing ?/& if needed $url = ereg_replace("[&?]+$", "", $url); *************** *** 420,424 **** */ function self_url() { ! return $this->url(getenv('REQUEST_URI')); } // end func self_url --- 418,427 ---- */ function self_url() { ! global $HTTP_SERVER_VARS; ! ! return $this->url($HTTP_SERVER_VARS["PHP_SELF"] . ! ((isset($HTTP_SERVER_VARS["QUERY_STRING"]) && ("" != $HTTP_SERVER_VARS["QUERY_STRING"])) ! ? "?" . $HTTP_SERVER_VARS["QUERY_STRING"] : "")); ! # return $this->url(getenv('REQUEST_URI')); } // end func self_url *************** *** 541,545 **** // If register_globals is off -> store session variables values if(!(bool) ini_get('register_globals')) { ! foreach ($_SESSION as $key => $value) { global $$key; eval("\$_SESSION[\$key]= \$$key;"); --- 544,551 ---- // If register_globals is off -> store session variables values if(!(bool) ini_get('register_globals')) { ! reset($_SESSION); ! ! while(list($key,) = each($_SESSION)) { ! // foreach ($_SESSION as $key => $value) { global $$key; eval("\$_SESSION[\$key]= \$$key;"); |