phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.bolocation.inc.php class.soa...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property/inc class.bolocation.inc.php class.soa...
Date: Sun, 17 Sep 2006 19:30:43 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   06/09/17 19:30:43

Modified files:
        inc            : class.bolocation.inc.php 
                         class.soadmin_location.inc.php 
                         class.uilocation.inc.php 

Log message:
        notice

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.bolocation.inc.php?cvsroot=phpgroupware&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soadmin_location.inc.php?cvsroot=phpgroupware&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uilocation.inc.php?cvsroot=phpgroupware&r1=1.31&r2=1.32

Patches:
Index: class.bolocation.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.bolocation.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- class.bolocation.inc.php    11 Sep 2006 14:46:29 -0000      1.17
+++ class.bolocation.inc.php    17 Sep 2006 19:30:43 -0000      1.18
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage location
-       * @version $Id: class.bolocation.inc.php,v 1.17 2006/09/11 14:46:29 
sigurdne Exp $
+       * @version $Id: class.bolocation.inc.php,v 1.18 2006/09/17 19:30:43 
sigurdne Exp $
        */
 
        /**
@@ -489,19 +489,19 @@
                        }
 
 //_debug_array($location['location']);
-
+                       if(isset($input_name))
+                       {
                        
$GLOBALS['phpgw']->session->appsession('lookup_fields',$this->currentapp,$input_name);
-                       
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp,$insert_record);
-//                     
$GLOBALS['phpgw']->session->appsession('input_name',$this->currentapp,$input_name);
-
-                       for ($i=0;$i<count($location['location']);$i++)
+                       }
+                       if(isset($insert_record))
                        {
-                               $lookup_name[] = 
$location['location'][$i]['name'];
-
+                               
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp,$insert_record);
                        }
+//                     
$GLOBALS['phpgw']->session->appsession('input_name',$this->currentapp,$input_name);
 
-                       
$GLOBALS['phpgw']->session->appsession('lookup_name',$this->currentapp,$lookup_name);
 
+                       if(isset($lookup_functions) && 
is_array($lookup_functions))
+                       {
                        for ($j=0;$j<count($lookup_functions);$j++)
                        {
                                $location['lookup_functions'] .= "\t".'function 
' . $lookup_functions[$j]['name'] ."\n";
@@ -511,12 +511,20 @@
                                $location['lookup_functions'] .= 
"\t\t".$lookup_functions[$j]['action'] ."\n";
                                $location['lookup_functions'] .= "\t".'}'."\n";
                        }
+                       }
 
 
-//_debug_array($location);
+                       if(isset($location) && is_array($location))
+                       {
+                               for ($i=0;$i<count($location['location']);$i++)
+                               {
+                                       $lookup_name[] = 
$location['location'][$i]['name'];
+                               }
 
+                               
$GLOBALS['phpgw']->session->appsession('lookup_name',$this->currentapp,$lookup_name);
+//_debug_array($location);
                        return $location;
-
+                       }
                }
 
                function read($data='')

Index: class.soadmin_location.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soadmin_location.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- class.soadmin_location.inc.php      14 Sep 2006 13:53:52 -0000      1.23
+++ class.soadmin_location.inc.php      17 Sep 2006 19:30:43 -0000      1.24
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage admin
-       * @version $Id: class.soadmin_location.inc.php,v 1.23 2006/09/14 
13:53:52 sigurdne Exp $
+       * @version $Id: class.soadmin_location.inc.php,v 1.24 2006/09/17 
19:30:43 sigurdne Exp $
        */
 
        /**
@@ -114,7 +114,7 @@
                                $start=0;
                        }
 
-                       if(is_array($data))
+               //      if(is_array($data))
                        {
                                $query = 
(isset($data['query'])?$data['query']:'');
                                $sort = 
(isset($data['sort'])?$data['sort']:'DESC');
@@ -509,6 +509,7 @@
                        $table          = 'fm_location_attrib';
                        $type_table = 'fm_location_type';
 
+                       $filtermethod = '';
                        if ($lookup_type)
                        {
                                $filtermethod = " OR (type_id < $lookup_type 
AND lookup_form=1) ";
@@ -539,6 +540,7 @@
                                $this->db->query($sql . 
$ordermethod,__LINE__,__FILE__);
                        }
 
+
                        while ($this->db->next_record())
                        {
                                $attrib[] = array
@@ -557,8 +559,11 @@
                                        'datatype'              => 
$this->db->f('datatype')
                                );
                        }
+                       if (isset($attrib))
+                       {
                        return $attrib;
                }
+               }
 
                function read_single_attrib($type_id,$id)
                {

Index: class.uilocation.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uilocation.inc.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- class.uilocation.inc.php    12 Sep 2006 09:16:13 -0000      1.31
+++ class.uilocation.inc.php    17 Sep 2006 19:30:43 -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 location
-       * @version $Id: class.uilocation.inc.php,v 1.31 2006/09/12 09:16:13 
sigurdne Exp $
+       * @version $Id: class.uilocation.inc.php,v 1.32 2006/09/17 19:30:43 
sigurdne Exp $
        */
 
        /**
@@ -351,10 +351,13 @@
                        $input_name             = 
$GLOBALS['phpgw']->session->appsession('lookup_fields',$this->currentapp);
 
                        $function_exchange_values = '';
+                       if(is_array($input_name))
+                       {
                        for ($k=0;$k<count($input_name);$k++)
                        {
                                $function_exchange_values .= 
"opener.document.form." . $input_name[$k] . ".value = '';" ."\r\n";
                        }
+                       }
 
                        for ($i=0;$i<count($uicols['name']);$i++)
                        {
@@ -508,7 +511,8 @@
                        $insert_record = 
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
                        
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp,'');
 
-                       if($_POST['save'])
+                       $values = false;
+                       if(isset($_POST['save']))
                        {
                                for ($i=0; 
$i<count($insert_record['location']); $i++)
                                {
@@ -591,7 +595,7 @@
                                }
                        }
 
-                       if(!$error_id && $location_code)
+                       if(!isset($error_id) && $location_code)
                        {
                                $values = 
$this->bo->read_single($location_code,array('tenant_id'=>'lookup'));
                                $check_history = 
$this->bo->check_history($location_code);
@@ -828,6 +832,8 @@
                                $attributes_values[$r]['type_id']       = 
$type_id;
                                $r++;
 
+                               if(isset($functions) && is_array($functions))
+                               {
                                for ($j=0;$j<count($functions);$j++)
                                {
                                        $lookup_functions .= 'function ' . 
$functions[$j]['name'] ."\n";
@@ -838,6 +844,7 @@
                                        $lookup_functions .= '}'."\r\n";
                                }
                        }
+                       }
 
                        
$GLOBALS['phpgw']->session->appsession('location_datatype',$this->currentapp,$location_datatype);
 
@@ -913,7 +920,7 @@
                                        break;
                        }
 
-                       if($receipt)
+                       if(isset($receipt))
                        {
                                $msgbox_data = 
$this->bocommon->msgbox_data($receipt);
                        }
@@ -962,17 +969,17 @@
                                'lang_change_type'                              
=> lang('Change type'),
                                'lang_no_change_type'                           
=> lang('No Change type'),
                                'lang_change_type_statustext'                   
=> lang('Type of changes'),
-                               'change_type_list'                              
=> $change_type_list,
-                               'check_history'                                 
=> $check_history,
+                               'change_type_list'                              
=> (isset($change_type_list)?$change_type_list:''),
+                               'check_history'                                 
=> (isset($check_history)?$check_history:''),
                                'lang_history'                                  
=> lang('History'),
                                'lang_history_statustext'                       
=> lang('Fetch the history for this item'),
-                               'table_header'                                  
=> $table_header,
-                               'values'                                        
=> $content,
+                               'table_header'                                  
=> (isset($table_header)?$table_header:''),
+                               'values'                                        
=> (isset($content)?$content:''),
 
                                'lang_related_info'                             
=> lang('related info'),
-                               'entities_link'                                 
=> $entities_link,
-                               'edit_street'                                   
=> $edit_street,
-                               'edit_tenant'                                   
=> $edit_tenant,
+                               'entities_link'                                 
=> (isset($entities_link)?$entities_link:''),
+                               'edit_street'                                   
=> (isset($edit_street)?$edit_street:''),
+                               'edit_tenant'                                   
=> (isset($edit_tenant)?$edit_tenant:''),
                                'edit_part_of_town'                             
=> $edit_part_of_town,
                                'edit_owner'                                    
=> $edit_owner,
                                'select_name_part_of_town'                      
=> $select_name_part_of_town,
@@ -986,10 +993,10 @@
                                'lang_owner_statustext'                         
=> $lang_owner_statustext,
                                'additional_fields'                             
=> $additional_fields,
                                'attributes_values'                             
=> $attributes_values,
-                               'lookup_functions'                              
=> $lookup_functions,
+                               'lookup_functions'                              
=> (isset($lookup_functions)?$lookup_functions:''),
                                'lang_none'                                     
=> lang('None'),
 
-                               'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
+                               'msgbox_data'                                   
=> (isset($msgbox_data)?$GLOBALS['phpgw']->common->msgbox($msgbox_data):''),
                                'lang_dateformat'                               
=> lang(strtolower($dateformat)),
                                'dateformat_validate'                           
=> $dateformat_validate,
                                'onKeyUp'                                       
=> $onKeyUp,




reply via email to

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