[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions_db.inc.php,1.2.2.5,1
From: |
Mark A Peters <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions_db.inc.php,1.2.2.5,1.2.2.6 class.sessions_php4.inc.php,1.6.2.5,1.6.2.6 |
Date: |
Sun, 15 Sep 2002 18:14:38 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv24836/phpgwapi/inc
Modified Files:
Tag: Version-0_9_14-branch
class.sessions_db.inc.php class.sessions_php4.inc.php
Log Message:
One more fix for the cookie stuff. This will at least delete properly.
Index: class.sessions_db.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.sessions_db.inc.php,v
retrieving revision 1.2.2.5
retrieving revision 1.2.2.6
diff -C2 -r1.2.2.5 -r1.2.2.6
*** class.sessions_db.inc.php 14 Sep 2002 21:58:27 -0000 1.2.2.5
--- class.sessions_db.inc.php 15 Sep 2002 22:14:35 -0000 1.2.2.6
***************
*** 51,55 ****
);
! var $dom;
/*************************************************************************\
--- 51,55 ----
);
! var $cookie_domain;
/*************************************************************************\
***************
*** 65,68 ****
--- 65,69 ----
/* Create the crypto object */
$GLOBALS['phpgw']->crypto =
CreateObject('phpgwapi.crypto');
+ $this->phpgw_set_cookiedomain()
}
***************
*** 290,296 ****
}
! function phpgw_set_domain()
{
! $dom = $GLOBALS['HTTP_HOST'];
if (preg_match("/^(.*):(.*)$/",$dom,$arr))
{
--- 291,297 ----
}
! function phpgw_set_cookiedomain()
{
! $dom = $GLOBALS['HTTP_SERVER_VARS']['HTTP_HOST'];
if (preg_match("/^(.*):(.*)$/",$dom,$arr))
{
***************
*** 300,308 ****
if (count($parts) > 2)
{
! $this->dom =
'.'.$parts[count($parts)-2].'.'.$parts[count($parts)-1];
}
else
{
! $this->dom = '';
}
}
--- 301,309 ----
if (count($parts) > 2)
{
! $this->cookie_domain =
'.'.$parts[count($parts)-2].'.'.$parts[count($parts)-1];
}
else
{
! $this->cookie_domain = '';
}
}
***************
*** 310,318 ****
function
phpgw_setcookie($cookiename,$cookievalue='',$cookietime=0)
{
! if (!$this->dom)
{
! $this->phpgw_set_domain();
}
!
setcookie($cookiename,$cookievalue,$cookietime,'/',$this->dom);
}
--- 311,319 ----
function
phpgw_setcookie($cookiename,$cookievalue='',$cookietime=0)
{
! if (!$this->cookie_domain)
{
! $this->phpgw_set_cookiedomain();
}
!
setcookie($cookiename,$cookievalue,$cookietime,'/',$this->cookie_domain);
}
Index: class.sessions_php4.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.sessions_php4.inc.php,v
retrieving revision 1.6.2.5
retrieving revision 1.6.2.6
diff -C2 -r1.6.2.5 -r1.6.2.6
*** class.sessions_php4.inc.php 14 Sep 2002 21:58:27 -0000 1.6.2.5
--- class.sessions_php4.inc.php 15 Sep 2002 22:14:35 -0000 1.6.2.6
***************
*** 49,53 ****
);
! var $dom;
/*************************************************************************\
--- 49,53 ----
);
! var $cookie_domain;
/*************************************************************************\
***************
*** 60,63 ****
--- 60,64 ----
/* Create the crypto object */
$GLOBALS['phpgw']->crypto =
CreateObject('phpgwapi.crypto');
+ $this->phpgw_set_cookiedomain();
}
***************
*** 123,127 ****
$this->kp3 = $kp3;
-
session_start();
$GLOBALS['phpgw_session'] =
$GLOBALS['HTTP_SESSION_VARS']['phpgw_session'];
--- 124,127 ----
***************
*** 274,280 ****
}
! function phpgw_set_domain()
{
! $dom = $GLOBALS['HTTP_HOST'];
if (preg_match("/^(.*):(.*)$/",$dom,$arr))
{
--- 274,280 ----
}
! function phpgw_set_cookiedomain()
{
! $dom = $GLOBALS['HTTP_SERVER_VARS']['HTTP_HOST'];
if (preg_match("/^(.*):(.*)$/",$dom,$arr))
{
***************
*** 284,302 ****
if (count($parts) > 2)
{
! $this->dom =
'.'.$parts[count($parts)-2].'.'.$parts[count($parts)-1];
}
else
{
! $this->dom = '';
}
}
function
phpgw_setcookie($cookiename,$cookievalue='',$cookietime=0)
{
! if (!$this->dom)
{
! $this->phpgw_set_domain();
}
!
setcookie($cookiename,$cookievalue,$cookietime,'/',$this->dom);
}
--- 284,303 ----
if (count($parts) > 2)
{
! $this->cookie_domain =
'.'.$parts[count($parts)-2].'.'.$parts[count($parts)-1];
}
else
{
! $this->cookie_domain = '';
}
+ session_set_cookie_params(0,'/',$this->cookie_domain);
}
function
phpgw_setcookie($cookiename,$cookievalue='',$cookietime=0)
{
! if (!$this->cookie_domain)
{
! $this->phpgw_set_cookiedomain();
}
!
setcookie($cookiename,$cookievalue,$cookietime,'/',$this->cookie_domain);
}
***************
*** 676,680 ****
session_unset();
session_destroy();
! //$GLOBALS['phpgw']->db->query("UPDATE phpgw_access_log
SET lo='" . time() . "' WHERE sessionid='"
// . $sessionid . "'",__LINE__,__FILE__);
--- 677,682 ----
session_unset();
session_destroy();
! $this->phpgw_setcookie(session_name());
! //$GLOBALS['phpgw']->db->query("UPDATE phpgw_access_log
SET lo='" . time() . "' WHERE sessionid='"
// . $sessionid . "'",__LINE__,__FILE__);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions_db.inc.php,1.2.2.5,1.2.2.6 class.sessions_php4.inc.php,1.6.2.5,1.6.2.6,
Mark A Peters <address@hidden> <=