From 497cabb8321a960af95620fd5b1298912338fda1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 23 May 2007 10:36:53 +0000 Subject: [PATCH] "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)" --- phpgwapi/inc/class.sessions.inc.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/phpgwapi/inc/class.sessions.inc.php b/phpgwapi/inc/class.sessions.inc.php index 3d792dba5a..6dd5f02cec 100644 --- a/phpgwapi/inc/class.sessions.inc.php +++ b/phpgwapi/inc/class.sessions.inc.php @@ -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)) {