phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] property/inc class.menu.inc.php


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property/inc class.menu.inc.php
Date: Thu, 23 Nov 2006 14:02:26 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   06/11/23 14:02:26

Modified files:
        inc            : class.menu.inc.php 

Log message:
        

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.menu.inc.php?cvsroot=phpgroupware&r1=1.31&r2=1.32

Patches:
Index: class.menu.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.menu.inc.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- class.menu.inc.php  27 Oct 2006 08:31:35 -0000      1.31
+++ class.menu.inc.php  23 Nov 2006 14:02:26 -0000      1.32
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage core
-       * @version $Id: class.menu.inc.php,v 1.31 2006/10/27 08:31:35 sigurdne 
Exp $
+       * @version $Id: class.menu.inc.php,v 1.32 2006/11/23 14:02:26 sigurdne 
Exp $
        */
 
        /**
@@ -19,6 +19,7 @@
        class menu
        {
                var $sub;
+               var $query;
 
                var $public_functions = array
                (
@@ -29,13 +30,17 @@
                {
                        $this->sub              = $sub;
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+                       $this->query    = get_var('query',array('POST','GET'));
                }
 
                function links($page='',$page_2='')
                {
                        $currentapp=$this->currentapp;
                        $sub = $this->sub;
+                       if(!$this->query)
+                       {
                        $menu = 
$GLOBALS['phpgw']->session->appsession('menu',substr(md5($currentapp.$sub . '_' 
. $page . '_' . $page_2),-20));
+                       }
 //_debug_array($page);
                        if(!$menu)
                        {
@@ -170,14 +175,21 @@
 
                                                $soadmin_location       = 
CreateObject($this->currentapp.'.soadmin_location');
                                                $location       = 
$soadmin_location->select_location_type();
+                                               $query_temp = 
explode('-',$this->query);
+                                               
                                                
$location_count=count($location);
                                                for ($j=0; $j<$location_count; 
$j++)
                                                {
+                                                       if($query_temp[$j])
+                                                       {
+                                                               $query[] = 
$query_temp[$j];
+                                                               $query_location 
= implode('-',$query);
+                                                       }
                                                        
if($page=='location'.$location[$j]['id'].'_')
                                                        {
                                                                
$menu['sub_menu'][$i]['this']=True;
                                                        }
-                                                       
$menu['sub_menu'][$i]['url'] = 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
$currentapp.'.uilocation.index', 'type_id'=> $location[$j]['id']));
+                                                       
$menu['sub_menu'][$i]['url'] = 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
$currentapp.'.uilocation.index', 'type_id'=> 
$location[$j]['id'],'query'=>$query_location));
                                                        
$menu['sub_menu'][$i]['text'] = $location[$j]['name'];
                                                        
$menu['sub_menu'][$i]['statustext'] = $location[$j]['descr'];
                                                        $i++;
@@ -189,7 +201,7 @@
                                                {
                                                        
$menu['sub_menu'][$i]['this']=True;
                                                }
-                                               $menu['sub_menu'][$i]['url']    
                =       
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
$currentapp.'.uilocation.index', 'lookup_tenant'=>1, 'type_id'=> 
$config_tenant));
+                                               $menu['sub_menu'][$i]['url']    
                =       
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
$currentapp.'.uilocation.index', 'lookup_tenant'=>1, 'type_id'=> 
$config_tenant,'query'=>$query_location));
                                                $menu['sub_menu'][$i]['text']   
                =       lang('Tenant');
                                                
$menu['sub_menu'][$i]['statustext']             =       lang('Tenant');
                                                $i++;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]