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 .= '