Permalink
Browse files

* hopefully fixing #13084

git-svn-id: http://svn.php.net/repository/pear/packages/HTTP_Session2/trunk@253092 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 5cf2ba5 commit e4e25e9ee3086fa32c733008e9d40ae048d7cd76 @till till committed Feb 17, 2008
Showing with 13 additions and 13 deletions.
  1. +13 −13 HTTP/Session2.php
View
@@ -323,10 +323,10 @@ public static function id($id = null)
*/
public static function setExpire($time, $add = false)
{
- if ($add && isset($GLOBALS['__HTTP_Session2_Expire'])) {
- $GLOBALS['__HTTP_Session2_Expire'] += $time;
+ if ($add && isset($_SESSION['__HTTP_Session2_Expire'])) {
+ $_SESSION['__HTTP_Session2_Expire'] += $time;
} else {
- $GLOBALS['__HTTP_Session2_Expire'] = $time;
+ $_SESSION['__HTTP_Session2_Expire'] = $time;
}
if (!isset($_SESSION['__HTTP_Session2_Expire_TS'])) {
$_SESSION['__HTTP_Session2_Expire_TS'] = time();
@@ -350,7 +350,7 @@ public static function setIdle($time, $add = false)
if ($add && isset($_SESSION['__HTTP_Session2_Idle'])) {
$_SESSION['__HTTP_Session2_Idle'] += $time;
} else {
- $GLOBALS['__HTTP_Session2_Idle'] = $time;
+ $_SESSION['__HTTP_Session2_Idle'] = $time;
}
if (!isset($_SESSION['__HTTP_Session2_Idle_TS'])) {
$_SESSION['__HTTP_Session2_Idle_TS'] = time();
@@ -366,11 +366,11 @@ public static function sessionValidThru()
{
if (
!isset($_SESSION['__HTTP_Session2_Idle_TS'])
- || !isset($GLOBALS['__HTTP_Session2_Idle'])) {
+ || !isset($_SESSION['__HTTP_Session2_Idle'])) {
return 0;
}
return $_SESSION['__HTTP_Session2_Idle_TS']
- + $GLOBALS['__HTTP_Session2_Idle'];
+ + $_SESSION['__HTTP_Session2_Idle'];
}
/**
@@ -381,13 +381,13 @@ public static function sessionValidThru()
public static function isExpired()
{
if (
- isset($GLOBALS['__HTTP_Session2_Expire'])
- && $GLOBALS['__HTTP_Session2_Expire'] > 0
+ isset($_SESSION['__HTTP_Session2_Expire'])
+ && $_SESSION['__HTTP_Session2_Expire'] > 0
&& isset($_SESSION['__HTTP_Session2_Expire_TS'])
&&
(
$_SESSION['__HTTP_Session2_Expire_TS']
- + $GLOBALS['__HTTP_Session2_Expire']
+ + $_SESSION['__HTTP_Session2_Expire']
) <= time()) {
return true;
}
@@ -402,12 +402,12 @@ public static function isExpired()
public static function isIdle()
{
if (
- isset($GLOBALS['__HTTP_Session2_Idle'])
- && $GLOBALS['__HTTP_Session2_Idle'] > 0
+ isset($_SESSION['__HTTP_Session2_Idle'])
+ && $_SESSION['__HTTP_Session2_Idle'] > 0
&& isset($_SESSION['__HTTP_Session2_Idle_TS'])
&& (
$_SESSION['__HTTP_Session2_Idle_TS']
- + $GLOBALS['__HTTP_Session2_Idle']
+ + $_SESSION['__HTTP_Session2_Idle']
) <= time()) {
return true;
}
@@ -733,4 +733,4 @@ public static function setGcProbability($gcProbability = null)
}
HTTP_Session2::init();
-?>
+?>

0 comments on commit e4e25e9

Please sign in to comment.