From 83c2195f270cec0ec35a893552136e4edd1a2a19 Mon Sep 17 00:00:00 2001 From: skeeter Date: Sun, 17 Jun 2001 04:23:35 +0000 Subject: [PATCH] Fixed a problem where the level parameters were not being set correctly whe using cookie based sessions. --- phpgwapi/inc/class.menutree.inc.php | 34 +++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/phpgwapi/inc/class.menutree.inc.php b/phpgwapi/inc/class.menutree.inc.php index e2f5384327..2198713674 100644 --- a/phpgwapi/inc/class.menutree.inc.php +++ b/phpgwapi/inc/class.menutree.inc.php @@ -297,10 +297,10 @@ var $last_column_size; $params=''; } - if($params != '') - { - $params = '&'.$params; - } +// if($params != '') +// { +// $params = '&'.$params; +// } /****************************************/ /* Always display the extreme top level */ @@ -360,20 +360,28 @@ var $last_column_size; if($tree[$cnt+1][0]>$tree[$cnt][0]) { $src = $REQUEST_URI; - if(strpos($src,'&p=') != 0) + if(ereg('[\?\&]p=',$src) != 0) { - $src = str_replace(substr($REQUEST_URI,strpos($src,'&p=')),'',$REQUEST_URI); + $src = ereg_replace('[\?\&]p=([0-9\|])','',$REQUEST_URI); } // echo 'Src = '.$src."
\n"; + if(strpos(' '.$src,'?')) + { + $extra_param = '&'; + } + else + { + $extra_param = '?'; + } if($expand[$cnt]==0) { // $str .= '+'; - $str .= '+'; + $str .= '+'; } else { // $str .= '-'; - $str .= '-'; + $str .= '-'; } } elseif(isset($tree[$cnt+1][0])) @@ -396,7 +404,15 @@ var $last_column_size; } else { - $str .= ''.$tree[$cnt][1].''; + if(strpos(' '.$tree[$cnt][2],'?')) + { + $extra_param = '&'; + } + else + { + $extra_param = '?'; + } + $str .= ''.$tree[$cnt][1].''; } } else