Last fix for the domain cookie.

This commit is contained in:
skeeter 2002-09-26 03:07:50 +00:00
parent 4191f270f7
commit 084bf0c8b4
2 changed files with 25 additions and 2 deletions

View File

@ -311,12 +311,23 @@
$parts = explode('.',$dom);
if (count($parts) > 2)
{
$this->cookie_domain = '.'.$parts[count($parts)-2].'.'.$parts[count($parts)-1];
if (!ereg('[0-9]+',$parts[1]))
{
for($i=1;$i<count($parts);$i++)
{
$this->cookie_domain .= '.'.$parts[$i];
}
}
else
{
$this->cookie_domain = '';
}
}
else
{
$this->cookie_domain = '';
}
print_debug('COOKIE_DOMAIN',$this->cookie_domain,'api');
}
function phpgw_setcookie($cookiename,$cookievalue='',$cookietime=0)

View File

@ -291,12 +291,24 @@
$parts = explode('.',$dom);
if (count($parts) > 2)
{
$this->cookie_domain = '.'.$parts[count($parts)-2].'.'.$parts[count($parts)-1];
if (!ereg('[0-9]+',$parts[1]))
{
for($i=1;$i<count($parts);$i++)
{
$this->cookie_domain .= '.'.$parts[$i];
}
}
else
{
$this->cookie_domain = '';
}
}
else
{
$this->cookie_domain = '';
}
print_debug('COOKIE_DOMAIN',$this->cookie_domain,'api');
session_set_cookie_params(0,'/',$this->cookie_domain);
}
function phpgw_setcookie($cookiename,$cookievalue='',$cookietime=0)