"fixed some 'funny' bugs if session-id is in the URL, by adding the session-related vars first (eg. creation of distribution lists does not work)"

This commit is contained in:
Ralf Becker 2007-05-23 10:36:53 +00:00
parent 95dce07346
commit 497cabb832

View File

@ -1255,17 +1255,24 @@
$url = str_replace ( 'http:', 'https:', $url);
}
}
$vars = array();
// add session params if not using cookies
if (!$GLOBALS['egw_info']['server']['usecookies'])
{
$vars['sessionid'] = $this->sessionid;
$vars['kp3'] = $this->kp3;
$vars['domain'] = $this->account_domain;
}
// check if the url already contains a query and ensure that vars is an array and all strings are in extravars
list($url,$othervars) = explode('?',$url);
if ($extravars && is_array($extravars))
{
$vars = $extravars;
$vars += $extravars;
$extravars = $othervars;
}
else
{
$vars = array();
if ($othervars) $extravars .= '&'.$othervars;
}
@ -1286,14 +1293,6 @@
}
}
// add session params if not using cookies
if (!$GLOBALS['egw_info']['server']['usecookies'])
{
$vars['sessionid'] = $this->sessionid;
$vars['kp3'] = $this->kp3;
$vars['domain'] = $this->account_domain;
}
// if there are vars, we add them urlencoded to the url
if (count($vars))
{