phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/inc class.contacts_sql.inc.php, 1.17.2.2.2.2


From: Alejandro Borges (lex) <address@hidden>
Subject: [Phpgroupware-cvs] phpgwapi/inc class.contacts_sql.inc.php, 1.17.2.2.2.29, 1.17.2.2.2.30
Date: Tue, 28 Oct 2003 07:14:41 +0000

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv20927

Modified Files:
      Tag: Version-0_9_16-branch
        class.contacts_sql.inc.php 
Log Message:
Um.... fix a du du on the last scary patch


Index: class.contacts_sql.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.contacts_sql.inc.php,v
retrieving revision 1.17.2.2.2.29
retrieving revision 1.17.2.2.2.30
diff -C2 -d -r1.17.2.2.2.29 -r1.17.2.2.2.30
*** class.contacts_sql.inc.php  28 Oct 2003 06:46:18 -0000      1.17.2.2.2.29
--- class.contacts_sql.inc.php  28 Oct 2003 07:14:38 -0000      1.17.2.2.2.30
***************
*** 778,872 ****
                }
  
!               /**
!               * Get all the data for any contact or contacts that are part of 
$optional_criteria.
!               *
!               * This function try to be a comprensive way to get data from 
contacts<br /> convert the contacts database output on a multidimensional 
array<br />
!               * @param int|array $contact_id
!               * @param mixed $optional_criteria criteria built with 
sql_criteria
!               * @param integer $line where this function is called, usefull 
for debug
!               * @param integer $file where this function is called, usefull 
for debug
!               * @return mixed array with all the data of contact (contacts).
!               */
!               function person_complete_data($contact_id, $optional_criteria = 
'', $line=__LINE__, $file=__FILE__)
!               {
!                       $this->request($this->import_export_fields);
!                       if (empty($optional_criteria))
!                       {
!                               if (intval($contact_id) == 0)
!                               {
!                                       // this is an error
!                                       return ;
!                               }
!                               
$this->criteria_token(sql_criteria::_equal('contact_id', $contact_id));
!                       }
!                       else
!                       {
!                               $this->criteria_token($optional_criteria);
!                       }
! 
!                       $sql = $this->get_sql();
! 
!                       $this->execute_query($sql, $line, $file);
! 
!                       while ($this->db->next_record())
!                       {
!                               $record = $this->db->Record;
!                               $contact['contact_id']          = 
$record['contact_id'];
!                               $contact['per_full_name']       = 
$record['per_full_name'];
!                               $contact['per_first_name']      = 
$record['per_first_name'];
!                               $contact['per_last_name']       = 
$record['per_full_name'];
!                               $contact['per_middle_name']     = 
$record['per_middle_name'];
!                               $contact['per_suffix']          = 
$record['per_suffix'];
!                               $contact['per_prefix']          = 
$record['per_prefix'];
!                               $contact['per_birthday']        = 
$record['per_birthday'];
!                               $contact['per_pubkey']          = 
$record['per_pubkey'];
!                               $contact['per_title']           = 
$record['per_title'];
!                               $contact['per_departament']     = 
$record['per_departamet'];
!                               $contact['per_initials']        = 
$record['per_initials'];
!                               $contact['per_sound']           = 
$record['per_sound'];
!                               $contact['per_active']          = 
$record['per_active'];
!                               $contact['per_createon']        = 
$record['per_createon'];
!                               $contact['per_createby']        = 
$record['per_createby'];
!                               $contact['per_modby']           = 
$record['per_modby'];
!                               $contact['per_modon']           = 
$record['per_modon'];
!                               //$contact['account_id']                = 
$record['account_id'];
!                               // Locations info
!                               $loc_id                                         
= $record['key_addr_id'];
!                               if($loc_id)
!                               {
!                                       $contact['locations'][$loc_id]['type']  
        = $record['addr_description'];
!                                       $contact['locations'][$loc_id]['add1']  
        = $record['addr_add1'];
!                                       $contact['locations'][$loc_id]['add2']  
        = $record['addr_add2'];
!                                       $contact['locations'][$loc_id]['add3']  
        = $record['addr_add3'];
!                                       
$contact['locations'][$loc_id]['address']       = $record['addr_address'];
!                                       $contact['locations'][$loc_id]['city']  
        = $record['addr_city'];
!                                       $contact['locations'][$loc_id]['state'] 
        = $record['addr_state'];
!                                       
$contact['locations'][$loc_id]['postal_code']   = $record['addr_postal_code'];
!                                       
$contact['locations'][$loc_id]['country']       = $record['addr_country'];
!                                       
$contact['locations'][$loc_id]['preferred']     = $record['addr_preferred'];
!                               }
!                               // Notes
!                               $note_id                                        
= $record['key_note_id'];
!                               if($note_id)
!                               {
!                                       $contact['notes'][$note_id]['text']     
        = $record['note_text'];
!                                       $contact['notes'][$note_id]['type']     
        = $record['note_description'];
!                               }
!                               // Communcation media fields
!                               if($record['comm_data'])
!                               {
!                                       $comm_descr                             
= $record['comm_description'];
!                                       $contact[$comm_descr]                   
= $record['comm_data'];
!                                       $contact['comm_type'][$comm_descr]      
= $record['comm_type_description'];
!                               }
!                               // Other fields
!                               if($record['other_value'])
!                               {
!                                       $contact[$record['other_name']]         
= $record['other_value'];
!                               }
!                       }
!                       return $contact;
!               }
! 
                function comms_fixed($comm_type, $comm_description)
                {
--- 778,782 ----
                }
  
!               
                function comms_fixed($comm_type, $comm_description)
                {





reply via email to

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