phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] addressbook/inc class.uiaddressbook.inc.php, 1.36.2.1


From: Jonathan Rivera <address@hidden>
Subject: [Phpgroupware-cvs] addressbook/inc class.uiaddressbook.inc.php, 1.36.2.15.2.21, 1.36.2.15.2.22 class.soaddressbook.inc.php, 1.14.2.3.2.12, 1.14.2.3.2.13 class.catalog_manager.inc.php, 1.1.2.1, 1.1.2.2
Date: Sun, 05 Oct 2003 05:17:26 +0000

Update of /cvsroot/phpgroupware/addressbook/inc
In directory subversions:/tmp/cvs-serv11770/addressbook/inc

Modified Files:
      Tag: Version-0_9_16-branch
        class.uiaddressbook.inc.php class.soaddressbook.inc.php 
        class.catalog_manager.inc.php 
Log Message:
bugfix for not reported bugs

Index: class.catalog_manager.inc.php
===================================================================
RCS file: 
/cvsroot/phpgroupware/addressbook/inc/Attic/class.catalog_manager.inc.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** class.catalog_manager.inc.php       30 Sep 2003 15:08:38 -0000      1.1.2.1
--- class.catalog_manager.inc.php       5 Oct 2003 05:17:24 -0000       1.1.2.2
***************
*** 201,217 ****
  
                        ksort($form_fields, SORT_NUMERIC);
! 
                        $cols='';
                        $count=1;
                        foreach($form_fields as $key => $row)
                        {
                                $tr_color = 
$this->nextmatchs->alternate_row_color($tr_color);
                                $cols = $cols . 
'<td>'.$row[0].'</td>'.'<td>'.$row[1].'</td>';;
!                               if($count == $this->num_cols)
                                {
                                        
$this->template->set_var('input_fields_cols', $cols);
                                        $this->template->fp('input_fields', 
'input_data', True);
                                        $cols = '';
!                                       $count=1;
                                }
                                $count ++;
--- 201,218 ----
  
                        ksort($form_fields, SORT_NUMERIC);
!                       $last_element = count($form_fields);
                        $cols='';
                        $count=1;
+                       
                        foreach($form_fields as $key => $row)
                        {
                                $tr_color = 
$this->nextmatchs->alternate_row_color($tr_color);
                                $cols = $cols . 
'<td>'.$row[0].'</td>'.'<td>'.$row[1].'</td>';;
!                               if($count == $this->num_cols || 
$key==$last_element)
                                {
                                        
$this->template->set_var('input_fields_cols', $cols);
                                        $this->template->fp('input_fields', 
'input_data', True);
                                        $cols = '';
!                                       $count=0;
                                }
                                $count ++;

Index: class.soaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.soaddressbook.inc.php,v
retrieving revision 1.14.2.3.2.12
retrieving revision 1.14.2.3.2.13
diff -C2 -d -r1.14.2.3.2.12 -r1.14.2.3.2.13
*** class.soaddressbook.inc.php 3 Oct 2003 04:55:53 -0000       1.14.2.3.2.12
--- class.soaddressbook.inc.php 5 Oct 2003 05:17:24 -0000       1.14.2.3.2.13
***************
*** 263,266 ****
--- 263,271 ----
                        $principal = $fields['tab_org_data'];
  
+                       if(!is_array($fields['tab_comms']['comm_data']))
+                       {
+                               $fields['tab_comms']['comm_data']=array();
+                       }
+ 
                        foreach($fields['tab_comms']['comm_data'] as 
$type_descr => $data)
                        {
***************
*** 316,320 ****
                        $queries = $fields['transactions'];
  
!                       unset($fields['tab_person_data']);
                        unset($fields['tab_extra']);
                        unset($fields['tab_orgs']);
--- 321,325 ----
                        $queries = $fields['transactions'];
  
!                       //unset($fields['tab_person_data']);
                        unset($fields['tab_extra']);
                        unset($fields['tab_orgs']);
***************
*** 358,361 ****
--- 363,378 ----
                        
                        $this->execute_queries($queries);
+ 
+                       /* Update the first and last name in accounts */
+                       $account_id = 
$this->contacts->get_account_id($person_id);
+                       if($account_id)
+                       {
+                               $account = 
CreateObject('phpgwapi.accounts',$account_id,'u');
+                               $account_data = $account->read_repository();
+                               $account_data['account_firstname'] = 
$fields['tab_person_data']['per_first_name'];
+                               $account_data['account_lastname'] = 
$fields['tab_person_data']['per_last_name'];
+                               $account->update_data($account_data);
+                               $account->save_repository();
+                       }
                }
                

Index: class.uiaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiaddressbook.inc.php,v
retrieving revision 1.36.2.15.2.21
retrieving revision 1.36.2.15.2.22
diff -C2 -d -r1.36.2.15.2.21 -r1.36.2.15.2.22
*** class.uiaddressbook.inc.php 2 Oct 2003 23:08:46 -0000       1.36.2.15.2.21
--- class.uiaddressbook.inc.php 5 Oct 2003 05:17:23 -0000       1.36.2.15.2.22
***************
*** 287,304 ****
                        $entries = $this->bo->$get_data_function($fields, 
$this->limit, $this->start, $this->order, $this->sort, '', $criteria);
  
                        if(count($fields_comms)>0)
                        {
!                               if (is_array($entries))
!                               {
!                                       foreach ($entries as $id)
!                                       {
!                                               $contacts[] = $id['contact_id'];
!                                       }
!                                       $this->entries_comm = 
$this->bo->get_comm_contact_data($contacts, $fields_comms);
!                               }
!                               else
                                {
!                                       $entries=array();
                                }
                        }
  
--- 287,302 ----
                        $entries = $this->bo->$get_data_function($fields, 
$this->limit, $this->start, $this->order, $this->sort, '', $criteria);
  
+                       if (!is_array($entries))
+                       {
+                               $entries=array();
+                       }
+                       
                        if(count($fields_comms)>0)
                        {
!                               foreach ($entries as $id)
                                {
!                                       $contacts[] = $id['contact_id'];
                                }
+                               $this->entries_comm = 
$this->bo->get_comm_contact_data($contacts, $fields_comms);
                        }
  
***************
*** 619,623 ****
                                $fields = $this->get_all_entry();
  
!                               $fields['owner'] = 
$GLOBALS['phpgw_info']['user']['account_id'];
  
                                $this->bo->edit_person($this->contact_id, 
$fields);
--- 617,621 ----
                                $fields = $this->get_all_entry();
  
!                               $fields['owner'] = $this->owner;
  
                                $this->bo->edit_person($this->contact_id, 
$fields);
***************
*** 830,834 ****
                                $fields = $this->get_all_entry();
                                
!                               $fields['owner'] = 
$GLOBALS['phpgw_info']['user']['account_id'];
  
                                $this->bo->edit_org($this->contact_id, $fields);
--- 828,832 ----
                                $fields = $this->get_all_entry();
                                
!                               $fields['owner'] = $this->owner;
  
                                $this->bo->edit_org($this->contact_id, $fields);
***************
*** 935,939 ****
                        //print 'fields:<br>';
                        $js_submit = '';
!                       if (($this->bo->so->contacts->grants[$fields['owner']] 
& PHPGW_ACL_DELETE) || 
                            $fields['owner'] == 
$GLOBALS['phpgw_info']['user']['account_id'])
                        {
--- 933,938 ----
                        //print 'fields:<br>';
                        $js_submit = '';
! 
!                       if (($this->bo->so->grants[$fields['owner']] & 
PHPGW_ACL_DELETE) || 
                            $fields['owner'] == 
$GLOBALS['phpgw_info']['user']['account_id'])
                        {
***************
*** 1095,1099 ****
                                //$defaul_person_name='entry[current_person]';
  
!                               $fields_to_search=array('person_id', 
'per_first_name', 'per_last_name');
                                $this->get_persons($fields_to_search, 
$fields['my_person']);
  
--- 1094,1098 ----
                                //$defaul_person_name='entry[current_person]';
  
!                               $fields_to_search=array('person_id', 
'per_full_name');
                                $this->get_persons($fields_to_search, 
$fields['my_person']);
  
***************
*** 2805,2809 ****
                                        {
                                                $this->my_person_data .= 
'<option value="' . $v['person_id'] . '">'
!                                                       .$v['per_first_name']. 
' ' .$v['per_last_name'].'</option>';
                                                
$this->my_person_array[$v['person_id']] = $v['per_first_name'];
                                        }
--- 2804,2808 ----
                                        {
                                                $this->my_person_data .= 
'<option value="' . $v['person_id'] . '">'
!                                                       
.$v['per_full_name'].'</option>';
                                                
$this->my_person_array[$v['person_id']] = $v['per_first_name'];
                                        }
***************
*** 2811,2815 ****
                                        {
                                                $this->all_person_data .= 
'<option value="' . $v['person_id'] . '">'
!                                                       .$v['per_first_name']. 
' ' .$v['per_last_name'].'</option>';
                                        }
                                }
--- 2810,2814 ----
                                        {
                                                $this->all_person_data .= 
'<option value="' . $v['person_id'] . '">'
!                                                       
.$v['per_full_name'].'</option>';
                                        }
                                }





reply via email to

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