phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.uilocation.inc.php, 1.15 class.sol


From: sigurdne
Subject: [Phpgroupware-cvs] property/inc class.uilocation.inc.php, 1.15 class.solocation.inc.php, 1.19 class.bolocation.inc.php, 1.8
Date: Thu, 3 Nov 2005 15:53:00 +0100

Update of property/inc

Modified Files:
     Branch: MAIN
            class.uilocation.inc.php lines: +22 -5
            class.solocation.inc.php lines: +8 -2
            class.bolocation.inc.php lines: +12 -7

Log Message:
*** empty log message ***

====================================================
Index: property/inc/class.uilocation.inc.php
diff -u property/inc/class.uilocation.inc.php:1.14 
property/inc/class.uilocation.inc.php:1.15
--- property/inc/class.uilocation.inc.php:1.14  Wed Aug 10 19:39:43 2005
+++ property/inc/class.uilocation.inc.php       Thu Nov  3 14:53:43 2005
@@ -67,6 +67,7 @@
                        $this->district_id                      = 
$this->bo->district_id;
                        $this->status                           = 
$this->bo->status;
                        $this->type_id                          = 
$this->bo->type_id;
+                       $this->allrows                          = 
$this->bo->allrows;

                        $this->menu->sub                        ='location';
                }
@@ -84,7 +85,8 @@
                                'part_of_town_id'       => 
$this->part_of_town_id,
                                'district_id'           => $this->district_id,
                                'status'                        => 
$this->status,
-                               'type_id'                       => 
$this->type_id
+                               'type_id'                       => 
$this->type_id,
+                               'allrows'                       => 
$this->allrows
                        );
                        $this->bo->save_sessiondata($data);
                }
@@ -188,7 +190,7 @@
                        $links = $this->menu->links('location'.$type_id . '_' . 
!!$lookup_tenant);


-                       $location_list = 
$this->bo->read(array('type_id'=>$type_id,'lookup_tenant'=>$lookup_tenant,'lookup'=>$lookup));
+                       $location_list = 
$this->bo->read(array('type_id'=>$type_id,'lookup_tenant'=>$lookup_tenant,'lookup'=>$lookup,'allrows'=>$this->allrows));

                        $uicols = $this->bo->uicols;
 //_debug_array($location_list);
@@ -398,6 +400,16 @@
                                                'start' =>$this->start
                        );

+                       if(!$this->allrows)
+                       {
+                               $record_limit   = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+                       }
+                       else
+                       {
+                               $record_limit   = $this->bo->total_records;
+                       }
+
+
                        $data = array
                        (
                                'lang_excel'                            => 
'excel',
@@ -411,9 +423,9 @@
                                'overlib_source'                                
=> './'.$this->currentapp.'/inc/overlib.js',
                                'lang_property_name'                    => 
lang('Property name'),
                                'links'                                         
        => $links,
-                               'allow_allrows'                                 
=> false,
+                               'allow_allrows'                                 
=> True,
                                'start_record'                                  
=> $this->start,
-                               'record_limit'                                  
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
+                               'record_limit'                                  
=> $record_limit,
                                'num_records'                                   
=> count($location_list),
                                'all_records'                                   
=> $this->bo->total_records,
                                'link_url'                                      
        => $GLOBALS['phpgw']->link('/index.php',$link_data),
@@ -423,6 +435,11 @@
                                'status_name'                                   
=> 'status',
                                'lang_no_status'                                
=> lang('No status'),
                                'status_list'                                   
=> $this->bo->select_status_list('filter',$this->status),
+
+                               'part_of_town_list'                             
=> $this->bocommon->select_part_of_town('filter',$this->part_of_town_id),
+                               'lang_no_part_of_town'                          
=> lang('no part of town'),
+                               'lang_town_statustext'                          
=> lang('Select the part of town the selection belongs to. To do not use a part 
of town select NO PART OF TOWN'),
+                               'select_name_part_of_town'                      
=> 'part_of_town_id',

                                'district_list'                                 
=> $this->bocommon->select_district_list('filter',$this->district_id),
                                'lang_no_district'                              
=> lang('no district'),

====================================================
Index: property/inc/class.solocation.inc.php
diff -u property/inc/class.solocation.inc.php:1.18 
property/inc/class.solocation.inc.php:1.19
--- property/inc/class.solocation.inc.php:1.18  Thu Sep 22 13:47:43 2005
+++ property/inc/class.solocation.inc.php       Thu Nov  3 14:53:43 2005
@@ -167,7 +167,7 @@
                                $allrows = 
(isset($data['allrows'])?$data['allrows']:'');
                                $lookup = 
(isset($data['lookup'])?$data['lookup']:'');
                                $status = 
(isset($data['status'])?$data['status']:'');
-
+                               $part_of_town_id = 
(isset($data['part_of_town_id'])?$data['part_of_town_id']:'');
                        }

                        if (!$type_id)
@@ -459,6 +459,12 @@
                        if ($district_id > 0)
                        {
                                $filtermethod .= " $where 
fm_part_of_town.district_id='$district_id' ";
+                               $where= 'AND';
+                       }
+
+                       if ($part_of_town_id > 0)
+                       {
+                               $filtermethod .= " $where 
fm_part_of_town.part_of_town_id='$part_of_town_id' ";
                                $where= 'AND';
                        }


====================================================
Index: property/inc/class.bolocation.inc.php
diff -u property/inc/class.bolocation.inc.php:1.7 
property/inc/class.bolocation.inc.php:1.8
--- property/inc/class.bolocation.inc.php:1.7   Wed May 18 16:05:55 2005
+++ property/inc/class.bolocation.inc.php       Thu Nov  3 14:53:43 2005
@@ -77,8 +77,8 @@
                        $part_of_town_id        = 
get_var('part_of_town_id',array('POST','GET'));
                        $status = get_var('status',array('POST','GET'));
                        $type_id        = 
get_var('type_id',array('POST','GET'));
-
-
+                       $allrows        = 
get_var('allrows',array('POST','GET'));
+
                        if ($start)
                        {
                                $this->start=$start;
@@ -124,6 +124,10 @@
                        {
                                $this->type_id = $type_id;
                        }
+                       if(isset($allrows))
+                       {
+                               $this->allrows = $allrows;
+                       }

                }

@@ -140,8 +144,8 @@
                        $this->part_of_town_id  = $data['part_of_town_id'];
                        $this->district_id              = $data['district_id'];
                        $this->status                   = $data['status'];
-                       $this->type_id                  = $data['type_id'];
-
+                       $this->type_id                  = $data['type_id'];
+                       $this->allrows                  = $data['allrows'];
                }

                function save_sessiondata($data)
@@ -592,9 +596,10 @@
                function read($data='')
                {
                        $location = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
-                                                                               
        'filter' => $this->filter,'cat_id' => $this->cat_id,'type_id' => 
$data['type_id'],'lookup_tenant'=>$data['lookup_tenant'],'lookup'=>$data['lookup'],
+                                                                               
        'filter' => $this->filter,'cat_id' => $this->cat_id,'type_id' => 
$data['type_id'],
+                                                                               
        'lookup_tenant'=>$data['lookup_tenant'],'lookup'=>$data['lookup'],
                                                                                
        'district_id'=>$this->district_id,'allrows'=>$data['allrows'],
-                                                                               
        'status'=>$this->status));
+                                                                               
        'status'=>$this->status,'part_of_town_id'=>$this->part_of_town_id));
                        $this->total_records = $this->so->total_records;
                        $this->uicols = $this->so->uicols;







reply via email to

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