verify that get_var did not return an empty cookie var (breaks noncookie sessions)

This commit is contained in:
Miles Lott 2002-08-12 00:59:34 +00:00
parent c60fbfd183
commit 0a3912cf96
2 changed files with 25 additions and 10 deletions

View File

@ -118,8 +118,16 @@
{ {
if(empty($sessionid) || !$sessionid) if(empty($sessionid) || !$sessionid)
{ {
$sessionid = get_var('sessionid',Array('COOKIE','GET')); $sessionid = get_var('sessionid',array('COOKIE'));
$kp3 = get_var('kp3',Array('COOKIE','GET')); if(@empty($sessionid))
{
$sessionid = get_var('sessionid',array('GET'));
}
$kp3 = get_var('kp3',array('COOKIE'));
if(@empty($kp3))
{
$kp3 = get_var('kp3',array('GET'));
}
} }
$db = $GLOBALS['phpgw']->db; $db = $GLOBALS['phpgw']->db;

View File

@ -113,14 +113,21 @@
{ {
if(empty($sessionid) || !$sessionid) if(empty($sessionid) || !$sessionid)
{ {
$sessionid = get_var('sessionid',Array('COOKIE','GET')); $sessionid = get_var('sessionid',array('COOKIE'));
$kp3 = get_var('kp3',Array('COOKIE','GET')); if(@empty($sessionid))
{
$sessionid = get_var('sessionid',array('GET'));
}
$kp3 = get_var('kp3',array('COOKIE'));
if(@empty($kp3))
{
$kp3 = get_var('kp3',array('GET'));
}
} }
$this->sessionid = $sessionid; $this->sessionid = $sessionid;
$this->kp3 = $kp3; $this->kp3 = $kp3;
session_start(); session_start();
$GLOBALS['phpgw_session'] = $GLOBALS['HTTP_SESSION_VARS']['phpgw_session']; $GLOBALS['phpgw_session'] = $GLOBALS['HTTP_SESSION_VARS']['phpgw_session'];