phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.boadmin_location.inc.php, 1.


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.boadmin_location.inc.php, 1.4, 1.5 class.soadmin_location.inc.php, 1.17, 1.18 class.socommon.inc.php, 1.33, 1.34 class.soequipment.inc.php, 1.23, 1.24 class.solocation.inc.php, 1.29, 1.30 class.someter.inc.php, 1.8, 1.9 class.soproject.inc.php, 1.30, 1.31 class.sorequest.inc.php, 1.18, 1.19 class.uiadmin_location.inc.php, 1.7, 1.8 class.uilookup.inc.php, 1.29, 1.30
Date: Wed, 27 Aug 2003 12:35:15 -0400

Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv27018/inc

Modified Files:
        class.boadmin_location.inc.php class.soadmin_location.inc.php 
        class.socommon.inc.php class.soequipment.inc.php 
        class.solocation.inc.php class.someter.inc.php 
        class.soproject.inc.php class.sorequest.inc.php 
        class.uiadmin_location.inc.php class.uilookup.inc.php 
Log Message:
no message

Index: class.boadmin_location.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boadmin_location.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.boadmin_location.inc.php      27 Jul 2003 15:53:24 -0000      1.4
--- class.boadmin_location.inc.php      27 Aug 2003 16:35:12 -0000      1.5
***************
*** 116,119 ****
--- 116,124 ----
                }
  
+               function reset_fm_cache()
+               {
+                       $this->so->reset_fm_cache();
+               }
+ 
  
                function read()

Index: class.soadmin_location.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soadmin_location.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** class.soadmin_location.inc.php      17 Jul 2003 10:46:22 -0000      1.17
--- class.soadmin_location.inc.php      27 Aug 2003 16:35:12 -0000      1.18
***************
*** 23,26 ****
--- 23,32 ----
                }
  
+ 
+               function reset_fm_cache()
+               {
+                       $this->db->query("DELETE FROM fm_cache 
",__LINE__,__FILE__);
+               }
+ 
                function read($data)
                {

Index: class.socommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.socommon.inc.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** class.socommon.inc.php      16 Jul 2003 08:12:24 -0000      1.33
--- class.socommon.inc.php      27 Aug 2003 16:35:12 -0000      1.34
***************
*** 35,38 ****
--- 35,56 ----
  
  
+               function fm_cache($name='',$value='')
+               {
+                       if($value)
+                       {
+                               $value = serialize($value);
+                               $this->db->query("INSERT INTO fm_cache 
(name,value)VALUES ('$name','$value')",__LINE__,__FILE__);
+                       }
+                       else
+                       {
+                               $this->db->query("SELECT value FROM fm_cache 
where name='$name'");
+                               $this->db->next_record();
+                               $value= unserialize($this->db->f('value'));
+ //                            _debug_array($value);
+                               return $value;
+ 
+                       }
+               }
+ 
                function get_user_list_right($right='',$acl_location='')
                {
***************
*** 57,60 ****
--- 75,79 ----
                        return $employees;
                }
+ 
  
                function get_equipment_type($equipment_id='')

Index: class.soequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soequipment.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** class.soequipment.inc.php   11 Jul 2003 11:03:53 -0000      1.23
--- class.soequipment.inc.php   27 Aug 2003 16:35:12 -0000      1.24
***************
*** 53,60 ****
  
                        return $filter_list;
- 
                }
  
- 
                function read($data)
                {
--- 53,58 ----
***************
*** 78,122 ****
                        }
  
!                       $entity_table = 'fm_equipment';
  
!                       $cols = $entity_table . '.location_code';
!                       $cols_return[] = 'location_code';
  
!                       $cols.= ',equipment_id';
!                       $cols_return[]                          = 
'equipment_id';
!                       $uicols['input_type'][]         = 'text';
!                       $uicols['name'][]                       = 
'equipment_id';
!                       $uicols['descr'][]                      = 
lang('Equipment');
!                       $uicols['statustext'][]         = lang('Equipment ID');
! 
!                       $cols.= ",$entity_table.descr";
!                       $cols_return[]                          = 'descr';
!                       $uicols['input_type'][]         = 'text';
!                       $uicols['name'][]                       = 'descr';
!                       $uicols['descr'][]                      = lang('descr');
!                       $uicols['statustext'][]         = lang('descr');
! 
!                       $cols.= ",fm_equipment_type.name as equipment_type";
!                       $cols_return[]                          = 
'equipment_type';
!                       $uicols['input_type'][]         = 'hidden';
!                       $uicols['name'][]                       = 
'equipment_type';
!                       $uicols['descr'][]                      = 
lang('equipment type');
!                       $uicols['statustext'][]         = lang('equipment 
type');
  
!                       $joinmethod .= " $this->join  fm_equipment_type ON 
(fm_equipment.equipment_type_id = fm_equipment_type.id))";
  
!                       $paranthesis .='(';
! 
!                       if($filter)
!                       {
!                               $cols.= ",c,i,n,t,d";
!                               $joinmethod .= " $this->join  
fm_equipment_attrib ON (fm_equipment.equipment_id = 
fm_equipment_attrib.entity_id))";
  
                                $paranthesis .='(';
-                       }
  
!                       $sql = 
$this->bocommon->generate_sql(array('entity_table'=>$entity_table,'cols_return'=>$cols_return,'cols'=>$cols,
!                                                                               
                                        
'uicols'=>$uicols,'joinmethod'=>$joinmethod,'paranthesis'=>$paranthesis,'query'=>$query,'lookup'=>$lookup));
  
  
                        if ($order)
--- 76,143 ----
                        }
  
!                       $sql = $this->socommon->fm_cache('sql_equipment_' . 
$lookup . '_' . $filter);
  
!                       if(!$sql)
!                       {
!                               $entity_table = 'fm_equipment';
  
!                               $cols = $entity_table . '.location_code';
!                               $cols_return[] = 'location_code';
  
!                               $cols.= ',equipment_id';
!                               $cols_return[]                          = 
'equipment_id';
!                               $uicols['input_type'][]         = 'text';
!                               $uicols['name'][]                       = 
'equipment_id';
!                               $uicols['descr'][]                      = 
lang('Equipment');
!                               $uicols['statustext'][]         = 
lang('Equipment ID');
! 
!                               $cols.= ",$entity_table.descr";
!                               $cols_return[]                          = 
'descr';
!                               $uicols['input_type'][]         = 'text';
!                               $uicols['name'][]                       = 
'descr';
!                               $uicols['descr'][]                      = 
lang('descr');
!                               $uicols['statustext'][]         = lang('descr');
! 
!                               $cols.= ",fm_equipment_type.name as 
equipment_type";
!                               $cols_return[]                          = 
'equipment_type';
!                               $uicols['input_type'][]         = 'hidden';
!                               $uicols['name'][]                       = 
'equipment_type';
!                               $uicols['descr'][]                      = 
lang('equipment type');
!                               $uicols['statustext'][]         = 
lang('equipment type');
  
!                               $joinmethod .= " $this->join  fm_equipment_type 
ON (fm_equipment.equipment_type_id = fm_equipment_type.id))";
  
                                $paranthesis .='(';
  
!                               if($filter)
!                               {
!                                       $cols.= ",c,i,n,t,d";
!                                       $joinmethod .= " $this->join  
fm_equipment_attrib ON (fm_equipment.equipment_id = 
fm_equipment_attrib.entity_id))";
  
+                                       $paranthesis .='(';
+                               }
+ 
+                               $sql = 
$this->bocommon->generate_sql(array('entity_table'=>$entity_table,'cols_return'=>$cols_return,'cols'=>$cols,
+                                                               
'uicols'=>$uicols,'joinmethod'=>$joinmethod,'paranthesis'=>$paranthesis,'query'=>$query,'lookup'=>$lookup));
+ 
+                               $this->socommon->fm_cache('sql_equipment_' . 
$lookup . '_' . $filter,$sql);
+                               $this->socommon->fm_cache('uicols_equipment_' . 
$lookup,$this->bocommon->uicols);
+                               
$this->socommon->fm_cache('cols_return_equipment_' . 
$lookup,$this->bocommon->cols_return);
+                               
$this->socommon->fm_cache('cols_return_lookup_equipment_' . 
$lookup,$this->bocommon->cols_return_lookup);
+                               
$this->socommon->fm_cache('cols_extra_equipment_' . 
$lookup,$this->bocommon->cols_extra);
+ 
+                               $uicols                                         
= $this->bocommon->uicols;
+                               $cols_return                            = 
$this->bocommon->cols_return;
+                               $this->cols_return_lookup       = 
$this->bocommon->cols_return_lookup;
+                               $this->cols_extra                       = 
$this->bocommon->cols_extra;
+ 
+                       }
+                       else
+                       {
+                               $uicols                                         
        = $this->socommon->fm_cache('uicols_equipment_' . $lookup);
+                               $cols_return                                    
= $this->socommon->fm_cache('cols_return_equipment_' . $lookup);
+                               $this->cols_return_lookup               = 
$this->socommon->fm_cache('cols_return_lookup_equipment_' . $lookup);
+                               $this->cols_extra                               
= $this->socommon->fm_cache('cols_extra_equipment_' . $lookup);
+                       }
  
                        if ($order)
***************
*** 159,168 ****
  
  //echo $sql;
-                       $uicols                                         = 
$this->bocommon->uicols;
-                       $cols_return                            = 
$this->bocommon->cols_return;
-                       $this->cols_return_lookup       = 
$this->bocommon->cols_return_lookup;
-                       $type_id                                        = 
$this->bocommon->type_id;
-                       $this->cols_extra                       = 
$this->bocommon->cols_extra;
- 
  
                        if($filter)
--- 180,183 ----

Index: class.solocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.solocation.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** class.solocation.inc.php    23 Aug 2003 17:43:49 -0000      1.29
--- class.solocation.inc.php    27 Aug 2003 16:35:12 -0000      1.30
***************
*** 114,118 ****
                        }
  
!                       $sql = $GLOBALS['phpgw']->session->appsession('sql_'. 
$type_id . '_' . $lookup_tenant ,$this->currentapp);
  
                        if(!$sql)
--- 114,119 ----
                        }
  
!                       $sql = $this->socommon->fm_cache('sql_'. $type_id . '_' 
. $lookup_tenant);
!               //      $sql = $GLOBALS['phpgw']->session->appsession('sql_'. 
$type_id . '_' . $lookup_tenant ,$this->currentapp);
  
                        if(!$sql)
***************
*** 222,226 ****
  
                                        $sub_query_tenant=1;
!                                       
$GLOBALS['phpgw']->session->appsession('sub_query_tenant_'. $type_id  . '_' . 
$lookup_tenant,$this->currentapp,$sub_query_tenant);
                                }
  
--- 223,228 ----
  
                                        $sub_query_tenant=1;
!                                       
$this->socommon->fm_cache('sub_query_tenant_'. $type_id  . '_' . 
$lookup_tenant,$sub_query_tenant);
!                               //      
$GLOBALS['phpgw']->session->appsession('sub_query_tenant_'. $type_id  . '_' . 
$lookup_tenant,$this->currentapp,$sub_query_tenant);
                                }
  
***************
*** 230,236 ****
                                        if (($config[$i]['location_type'] <= 
$type_id) && ($config[$i]['f_key'] ==1))
                                        {
!                                               $joinmethod .= " 
$this->left_join  " . $config[$i]['reference_table'] . " ON ( fm_location" . 
$config[$i]['location_type'] . "." . $config[$i]['column_name'] . "=" . 
$config[$i]['reference_table'] . ".".$config[$i]['reference_id']."))";
! 
!                                               $paranthesis .='(';
                                        }
  
--- 232,243 ----
                                        if (($config[$i]['location_type'] <= 
$type_id) && ($config[$i]['f_key'] ==1))
                                        {
!                                               if(!$lookup_tenant && 
$config[$i]['column_name']=='tenant_id')
!                                               {
!                                               }
!                                               else
!                                               {
!                                                       $joinmethod .= " 
$this->join  " . $config[$i]['reference_table'] . " ON ( fm_location" . 
$config[$i]['location_type'] . "." . $config[$i]['column_name'] . "=" . 
$config[$i]['reference_table'] . ".".$config[$i]['reference_id']."))";
!                                                       $paranthesis .='(';
!                                               }
                                        }
  
***************
*** 242,246 ****
  
                                                        $sub_query_street=1;
!                                                       
$GLOBALS['phpgw']->session->appsession('sub_query_street_'. $type_id 
,$this->currentapp,$sub_query_street);
  
                                                        $cols.= 
',fm_streetaddress.descr as street_name';
--- 249,254 ----
  
                                                        $sub_query_street=1;
!                                                       
$this->socommon->fm_cache('sub_query_street_'. $type_id  . '_' . 
$lookup_tenant,$sub_query_street);
!                                       //              
$GLOBALS['phpgw']->session->appsession('sub_query_street_'. $type_id 
,$this->currentapp,$sub_query_street);
  
                                                        $cols.= 
',fm_streetaddress.descr as street_name';
***************
*** 277,300 ****
                                }
  
-                               $this->uicols = $uicols;
- 
                                $from .= " FROM $paranthesis 
fm_location$type_id ";
  
                                $sql = "SELECT $cols $from $joinmethod";
  
!                               $GLOBALS['phpgw']->session->appsession('sql_'. 
$type_id ,$this->currentapp,$sql);
!                               
$GLOBALS['phpgw']->session->appsession('uicols_'. $type_id 
,$this->currentapp,$uicols);
!                               
$GLOBALS['phpgw']->session->appsession('cols_return_'. $type_id 
,$this->currentapp,$cols_return);
                        }
                        else
                        {
!                               $uicols = 
$GLOBALS['phpgw']->session->appsession('uicols_'. $type_id ,$this->currentapp);
!                               $cols_return = 
$GLOBALS['phpgw']->session->appsession('cols_return_'. $type_id 
,$this->currentapp);
  
!                               $this->uicols = $uicols;
!                               $sub_query_tenant       = 
$GLOBALS['phpgw']->session->appsession('sub_query_tenant_'. $type_id 
,$this->currentapp);
!                               $sub_query_street       = 
$GLOBALS['phpgw']->session->appsession('sub_query_street_'. $type_id 
,$this->currentapp);
                        }
  
                        if ($order)
                        {
--- 285,316 ----
                                }
  
                                $from .= " FROM $paranthesis 
fm_location$type_id ";
  
                                $sql = "SELECT $cols $from $joinmethod";
  
!                               $this->socommon->fm_cache('sql_'. $type_id . 
'_' . $lookup_tenant ,$sql);
! //                            $GLOBALS['phpgw']->session->appsession('sql_'. 
$type_id ,$this->currentapp,$sql);
!                               $this->socommon->fm_cache('uicols_'. $type_id  
. '_' . $lookup_tenant,$uicols);
!                               $this->socommon->fm_cache('cols_return_'. 
$type_id  . '_' . $lookup_tenant,$cols_return);
! 
! //                            
$GLOBALS['phpgw']->session->appsession('uicols_'. $type_id 
,$this->currentapp,$uicols);
! //                            
$GLOBALS['phpgw']->session->appsession('cols_return_'. $type_id 
,$this->currentapp,$cols_return);
                        }
                        else
                        {
!                               $uicols = $this->socommon->fm_cache('uicols_'. 
$type_id  . '_' . $lookup_tenant);
!                               $cols_return = 
$this->socommon->fm_cache('cols_return_'. $type_id  . '_' . $lookup_tenant);
! 
! //                            $uicols = 
$GLOBALS['phpgw']->session->appsession('uicols_'. $type_id ,$this->currentapp);
! //                            $cols_return = 
$GLOBALS['phpgw']->session->appsession('cols_return_'. $type_id 
,$this->currentapp);
  
!                               $sub_query_tenant       = 
$this->socommon->fm_cache('sub_query_tenant_'. $type_id  . '_' . 
$lookup_tenant);
!                               $sub_query_street       = 
$this->socommon->fm_cache('sub_query_street_'. $type_id  . '_' . 
$lookup_tenant);
! //                            $sub_query_tenant       = 
$GLOBALS['phpgw']->session->appsession('sub_query_tenant_'. $type_id 
,$this->currentapp);
! //                            $sub_query_street       = 
$GLOBALS['phpgw']->session->appsession('sub_query_street_'. $type_id 
,$this->currentapp);
                        }
  
+                       $this->uicols = $uicols;
+ 
                        if ($order)
                        {
***************
*** 464,468 ****
                                if (($config[$i]['location_type'] <= $type_id) 
&& ($config[$i]['f_key'] ==1))
                                {
!                                       $joinmethod .= " $this->left_join  " . 
$config[$i]['reference_table'] . " ON ( fm_location" . 
$config[$i]['location_type'] . "." . $config[$i]['column_name'] . "=" . 
$config[$i]['reference_table'] . ".".$config[$i]['reference_id']."))";
  
                                        $paranthesis .='(';
--- 480,484 ----
                                if (($config[$i]['location_type'] <= $type_id) 
&& ($config[$i]['f_key'] ==1))
                                {
!                                       $joinmethod .= " $this->join  " . 
$config[$i]['reference_table'] . " ON ( fm_location" . 
$config[$i]['location_type'] . "." . $config[$i]['column_name'] . "=" . 
$config[$i]['reference_table'] . ".".$config[$i]['reference_id']."))";
  
                                        $paranthesis .='(';
***************
*** 550,556 ****
                        $sql = "SELECT $cols $from $joinmethod";
  
!                       $GLOBALS['phpgw']->session->appsession('sql_single_'. 
$type_id ,$this->currentapp,$sql);
!                       
$GLOBALS['phpgw']->session->appsession('uicols_single_'. $type_id 
,$this->currentapp,$uicols);
!                       
$GLOBALS['phpgw']->session->appsession('cols_return_single_'. $type_id 
,$this->currentapp,$cols_return);
  
                        return $sql;
--- 566,577 ----
                        $sql = "SELECT $cols $from $joinmethod";
  
!                       $this->socommon->fm_cache('sql_single_'. $type_id,$sql);
!                       $this->socommon->fm_cache('uicols_single_'. 
$type_id,$uicols);
!                       $this->socommon->fm_cache('cols_return_single_'. 
$type_id,$cols_return);
! 
! 
! //                    $GLOBALS['phpgw']->session->appsession('sql_single_'. 
$type_id ,$this->currentapp,$sql);
! //                    
$GLOBALS['phpgw']->session->appsession('uicols_single_'. $type_id 
,$this->currentapp,$uicols);
! //                    
$GLOBALS['phpgw']->session->appsession('cols_return_single_'. $type_id 
,$this->currentapp,$cols_return);
  
                        return $sql;
***************
*** 592,596 ****
                        $uicols['statustext'][]         = lang('remark');
  
!                       $sql = 
$GLOBALS['phpgw']->session->appsession('sql_single_'. $type_id 
,$this->currentapp);
  
                        if(!$sql)
--- 613,618 ----
                        $uicols['statustext'][]         = lang('remark');
  
!                       $sql = $this->socommon->fm_cache('sql_single_'. 
$type_id);
! //                    $sql = 
$GLOBALS['phpgw']->session->appsession('sql_single_'. $type_id 
,$this->currentapp);
  
                        if(!$sql)
***************
*** 601,606 ****
                        {
  
!                               $this->uicols   = 
$GLOBALS['phpgw']->session->appsession('uicols_single_'. $type_id 
,$this->currentapp);
!                               $this->cols_return      = 
$GLOBALS['phpgw']->session->appsession('cols_return_single_'. $type_id 
,$this->currentapp);
                        }
  
--- 623,631 ----
                        {
  
!                               $this->uicols   =       
$this->socommon->fm_cache('uicols_single_'. $type_id);
!                               $this->cols_return      =       
$this->socommon->fm_cache('cols_return_single_'. $type_id);
! 
! //                            $this->uicols   = 
$GLOBALS['phpgw']->session->appsession('uicols_single_'. $type_id 
,$this->currentapp);
! //                            $this->cols_return      = 
$GLOBALS['phpgw']->session->appsession('cols_return_single_'. $type_id 
,$this->currentapp);
                        }
  

Index: class.someter.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.someter.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.someter.inc.php       9 Jul 2003 11:12:16 -0000       1.8
--- class.someter.inc.php       27 Aug 2003 16:35:12 -0000      1.9
***************
*** 131,135 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " $where (fm_meter.name LIKE 
'%$query%' OR fm_meter.id LIKE '%$query%' OR fm_meter.location_code LIKE 
'%$query%')";
                        }
  
--- 131,135 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " $where (fm_meter.name LIKE 
'%$query%' OR fm_meter.num LIKE '%$query%' OR fm_meter.location_code LIKE 
'%$query%' OR fm_meter.address LIKE '%$query%')";
                        }
  

Index: class.soproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** class.soproject.inc.php     26 Aug 2003 19:16:30 -0000      1.30
--- class.soproject.inc.php     27 Aug 2003 16:35:12 -0000      1.31
***************
*** 469,473 ****
                        if ($project['power_meter'] )
                        {
!                               
$this->update_power_meter($project['power_meter'],$project['location_code']);
                        }
  
--- 469,473 ----
                        if ($project['power_meter'] )
                        {
!                               
$this->update_power_meter($project['power_meter'],$project['location_code'],$address);
                        }
  
***************
*** 506,512 ****
                }
  
!               function update_power_meter($power_meter,$location_code)
                {
  
                        $this->db->query("SELECT count(*) FROM fm_meter where 
location_code='$location_code' and category=1",__LINE__,__FILE__);
  
--- 506,535 ----
                }
  
!               function 
update_power_meter($power_meter,$location_code,$address)
                {
  
+                       $location=explode('-',$location_code);
+ 
+                       $i=1;
+                       if (isset($location) AND is_array($location))
+                       {
+                               foreach($location as $location_entry)
+                               {
+ 
+                                       $cols[] = 'loc' . $i;
+                                       $vals[] = $location_entry;
+ 
+                                       $i++;
+                               }
+ 
+                       }
+ 
+                       if($cols)
+                       {
+                               $cols   = "," . implode(",", $cols);
+                               $vals   = ",'" . implode("','", $vals) . "'";
+                       }
+ 
+ 
                        $this->db->query("SELECT count(*) FROM fm_meter where 
location_code='$location_code' and category=1",__LINE__,__FILE__);
  
***************
*** 515,531 ****
                        if ( $this->db->f(0))
                        {
!                               $this->db->query("update fm_meter set name='" . 
$power_meter. "' where location_code='" . $location_code. "' and 
type='power_meter'",__LINE__,__FILE__);
                        }
                        else
                        {
                                $meter_id       = $this->generate_meter_id();
!                               $this->db->query("insert into fm_meter 
(num,name,category,location_code,entry_date,user_id $cols) "
                                        . "VALUES ('"
                                        . $meter_id. "','"
                                        . $power_meter. "',"
                                        . "1,'"
!                                       . $location_code. "','"
!                                       . time() . "','"
!                                       . $this->account. " $vals 
')",__LINE__,__FILE__);
                        }
                }
--- 538,553 ----
                        if ( $this->db->f(0))
                        {
!                               $this->db->query("update fm_meter set 
name='$power_meter',address='$address' where location_code='$location_code' and 
category='1'",__LINE__,__FILE__);
                        }
                        else
                        {
                                $meter_id       = $this->generate_meter_id();
!                               $this->db->query("insert into fm_meter 
(num,name,category,location_code,entry_date,user_id,address $cols) "
                                        . "VALUES ('"
                                        . $meter_id. "','"
                                        . $power_meter. "',"
                                        . "1,'"
!                                       . $location_code. "',"
!                                       . time() . ",$this->account '$address' 
$vals)",__LINE__,__FILE__);
                        }
                }
***************
*** 608,612 ****
                        if ($project['power_meter'] )
                        {
!                               
$this->update_power_meter($project['power_meter'],$project['location_code']);
                        }
        // -----------------which branch is represented
--- 630,634 ----
                        if ($project['power_meter'] )
                        {
!                               
$this->update_power_meter($project['power_meter'],$project['location_code'],$address);
                        }
        // -----------------which branch is represented

Index: class.sorequest.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sorequest.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** class.sorequest.inc.php     26 Aug 2003 20:34:26 -0000      1.18
--- class.sorequest.inc.php     27 Aug 2003 16:35:12 -0000      1.19
***************
*** 535,539 ****
                        if ($request['power_meter'] )
                        {
!                               
$this->soproject->update_power_meter($request['power_meter'],$request['location_code']);
                        }
  
--- 535,539 ----
                        if ($request['power_meter'] )
                        {
!                               
$this->soproject->update_power_meter($request['power_meter'],$request['location_code'],$address);
                        }
  
***************
*** 646,650 ****
                        if ($request['power_meter'] )
                        {
!                               
$this->soproject->update_power_meter($request['power_meter'],$request['location_code']);
                        }
  
--- 646,650 ----
                        if ($request['power_meter'] )
                        {
!                               
$this->soproject->update_power_meter($request['power_meter'],$request['location_code'],$address);
                        }
  

Index: class.uiadmin_location.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiadmin_location.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.uiadmin_location.inc.php      7 Aug 2003 16:08:59 -0000       1.7
--- class.uiadmin_location.inc.php      27 Aug 2003 16:35:12 -0000      1.8
***************
*** 61,64 ****
--- 61,65 ----
                {
  
+                       $this->bo->reset_fm_cache();
                        $GLOBALS['phpgw']->xslttpl->add_file(array(
                                                                                
'admin_location',

Index: class.uilookup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilookup.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** class.uilookup.inc.php      8 Aug 2003 17:07:58 -0000       1.29
--- class.uilookup.inc.php      27 Aug 2003 16:35:12 -0000      1.30
***************
*** 687,691 ****
                                'record_limit'                                  
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
                                'num_records'                                   
=> count($equipment_list),
!                               'all_records'                                   
=> $this->bo->total_records,
                                'link_url'                                      
        => $GLOBALS['phpgw']->link('/index.php',$link_select),
                                'img_path'                                      
        => $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
--- 687,691 ----
                                'record_limit'                                  
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
                                'num_records'                                   
=> count($equipment_list),
!                               'all_records'                                   
=> $this->boequipment->total_records,
                                'link_url'                                      
        => $GLOBALS['phpgw']->link('/index.php',$link_select),
                                'img_path'                                      
        => $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),





reply via email to

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