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.3


From: Alejandro Borges (lex) <address@hidden>
Subject: [Phpgroupware-cvs] phpgwapi/inc class.contacts_sql.inc.php, 1.17.2.2.2.37, 1.17.2.2.2.38
Date: Mon, 01 Dec 2003 23:07:32 +0000

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

Modified Files:
      Tag: Version-0_9_16-branch
        class.contacts_sql.inc.php 
Log Message:
Import, fixes 6832-6833 and others


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.37
retrieving revision 1.17.2.2.2.38
diff -C2 -d -r1.17.2.2.2.37 -r1.17.2.2.2.38
*** class.contacts_sql.inc.php  19 Nov 2003 22:39:05 -0000      1.17.2.2.2.37
--- class.contacts_sql.inc.php  1 Dec 2003 23:07:30 -0000       1.17.2.2.2.38
***************
*** 35,42 ****
        * Note that changes here must also work in the LDAP version.
        * @package contacts
!       * @author: Jonathan Rivera <jarg at co.com.mx>
        * @copyright Copyright &copy; 2003 FreeSoftware Foundation
        * @license GPL
!       * @example: $contacts = CreateObject('phpgwapi.contacts');
        */
        class contacts_ extends sql_builder
--- 35,42 ----
        * Note that changes here must also work in the LDAP version.
        * @package contacts
!       * @author Jonathan Rivera <jarg at co.com.mx>
        * @copyright Copyright &copy; 2003 FreeSoftware Foundation
        * @license GPL
!       * @example: <code> $contacts = CreateObject('phpgwapi.contacts'); 
</code>
        */
        class contacts_ extends sql_builder
***************
*** 57,61 ****
                var $stock_contact_fields;
  
!                 /**
                *
                * This is an array of three elements that are arrays themselves.
--- 57,61 ----
                var $stock_contact_fields;
  
!               /**
                *
                * This is an array of three elements that are arrays themselves.
***************
*** 73,76 ****
--- 73,77 ----
                * All of the array data points to the english translation of 
the field that should then
                * be langed to get a label for the field
+               * @access private
                */
  
***************
*** 258,262 ****
                                                        )
                                );
! 
                var $map = array('contact_id'           => 
array('phpgwapi.contact_central', '0'),
                                 'owner'                => 
array('phpgwapi.contact_central', '0'),
--- 259,265 ----
                                                        )
                                );
!               /**
!               * @access private
!               */
                var $map = array('contact_id'           => 
array('phpgwapi.contact_central', '0'),
                                 'owner'                => 
array('phpgwapi.contact_central', '0'),
***************
*** 449,452 ****
--- 452,458 ----
  
                                 'key_cat_id'           => 
array('phpgwapi.contact_categories', '13'));
+               /**
+               * @access private
+               */
                var $import_export_fields = array('contact_id', 
                                                'access',
***************
*** 490,493 ****
--- 496,502 ----
                                                'other_name');
  
+               /**
+               * @access private
+               */
                var $import_fields = array('contact_id' => 'contact id',
                                           'first_name' => 'first name',
***************
*** 517,520 ****
--- 526,532 ----
                //'parent_id'           => array('categories_parent', '14'));
  
+               /address@hidden
+               * @access private
+               */
                /**
                * Adresses fields array for mantain backward compatibility.
***************
*** 582,586 ****
                        }
                }
! 
                function read_sessiondata()
                {
--- 594,601 ----
                        }
                }
!               /address@hidden/
!               /address@hidden
!               * @access private
!               */
                function read_sessiondata()
                {
***************
*** 646,649 ****
--- 661,665 ----
                        
$GLOBALS['phpgw']->session->appsession('session_data','phpgwapi',$data);
                }
+               /address@hidden/
  
                function delete_sessiondata($var='')
***************
*** 685,690 ****
                \*************************************************************/
                
-               /* @deprecated */
                /* send this the id and whatever fields you want to see */
                function read_single_entry($id,$fields='')
                {
--- 701,709 ----
                \*************************************************************/
                
                /* send this the id and whatever fields you want to see */
+               /address@hidden
+               * @deprecated 
+               * @access private
+               */
                function read_single_entry($id,$fields='')
                {
***************
*** 753,757 ****
                }
  
-               /* @deprecated */
                function read_last_entry($fields='')
                {
--- 772,775 ----
***************
*** 761,765 ****
                }
  
-               /* @deprecated */
                /* send this the range, query, sort, order and whatever fields 
you want to see */
                function 
read($start=0,$limit=0,$fields='',$query='',$filter='',$sort='',$order='', 
$lastmod=-1)
--- 779,782 ----
***************
*** 803,807 ****
  
                // Deprecated, this method is for old import only, I ask help 
to code a new one
-               /* @deprecated */
                function add($owner,$fields,$access='',$cat_id='',$tid='n')
                {
--- 820,823 ----
***************
*** 810,814 ****
                                $this->explode_field_name($field, $value, 
$fields);
                        }
!                       if(in_array($fields, $fields['note']))
                        {
                                $note['type'] = 'general';
--- 826,831 ----
                                $this->explode_field_name($field, $value, 
$fields);
                        }
! 
!                       if(in_array($fields['note'], $fields))
                        {
                                $note['type'] = 'general';
***************
*** 842,846 ****
                }
  
-               /* @deprecated */
                function field_exists($id,$field_name)
                {
--- 859,862 ----
***************
*** 854,858 ****
                }
  
-               /* @deprecated */
                function 
add_single_extra_field($id,$owner,$field_name,$field_value)
                {
--- 870,873 ----
***************
*** 861,865 ****
                }
  
-               /* @deprecated */
                function delete_single_extra_field($id,$field_name)
                {
--- 876,879 ----
***************
*** 868,872 ****
                }
  
-               /* @deprecated */
                function 
update($id,$owner,$fields,$access='',$cat_id='',$tid='n')
                {
--- 882,885 ----
***************
*** 900,904 ****
                }
  
-               /* @deprecated */
                function read_extra_fields($id)
                {
--- 913,916 ----
***************
*** 912,916 ****
                        $other->update($id, array('other_value' => $value), 
$criteria);
                }
! 
  
                /*************************************************************\
--- 924,928 ----
                        $other->update($id, array('other_value' => $value), 
$criteria);
                }
!               /address@hidden/
  
                /*************************************************************\
***************
*** 1511,1514 ****
--- 1523,1527 ----
                * @param integer $cat_id  The categori id to find 
                * @return array with all sub categories
+               * @access private
                */
                function get_sub_cats($cat_id)
***************
*** 1557,1561 ****
                        return $comms;
                }
!               
                function comms_fixed($comm_type, $comm_description)
                {
--- 1570,1577 ----
                        return $comms;
                }
! 
!               /**
!               * @access private
!               */              
                function comms_fixed($comm_type, $comm_description)
                {
***************
*** 1566,1588 ****
                                $this->hash_comms_import = 
                                        array('email'  => array('home'          
=> 'home email',
!                                                               'work'          
=> 'work email',
!                                                               'other'         
=> 'other email'),
                                              'phone'  => array('home'          
=> 'home phone',
!                                                               'work'          
=> 'work phone',
!                                                               'other'         
=> 'other phone',
!                                                               'msg'           
=> 'msg phone',
!                                                               'home_two'      
=> 'second home phone',
!                                                               'work_two'      
=> 'second work phone',
!                                                               'isdn'          
=> 'isdn',
!                                                               'other_two'     
=> 'second other phone',
!                                                               'pager'         
=> 'pager'),
                                              'fax'    => array('work'          
=> 'work fax',
!                                                               'home'          
=> 'home fax',
!                                                               'other'         
=> 'other fax'),
                                              'mobile' => array('car'           
=> 'car phone',
!                                                               'cell'          
=> 'mobile (cell) phone'));
                        }
! 
!                       return 
$this->search_comm_descr($hash_comms_import[$comm_type][$comm_description]);
                }
  
--- 1582,1603 ----
                                $this->hash_comms_import = 
                                        array('email'  => array('home'          
=> 'home email',
!                                                                               
        'work'          => 'work email',
!                                                                               
        'other'         => 'other email'),
                                              'phone'  => array('home'          
=> 'home phone',
!                                                                               
        'work'          => 'work phone',
!                                                                               
        'other'         => 'other phone',
!                                                                               
        'msg'           => 'msg phone',
!                                                                               
        'home_two'      => 'second home phone',
!                                                                               
        'work_two'      => 'second work phone',
!                                                                               
        'isdn'          => 'isdn',
!                                                                               
        'other_two'     => 'second other phone',
!                                                                               
        'pager'         => 'pager'),
                                              'fax'    => array('work'          
=> 'work fax',
!                                                                               
        'home'          => 'home fax',
!                                                                               
        'other'         => 'other fax'),
                                              'mobile' => array('car'           
=> 'car phone',
!                                                                               
        'cell'          => 'mobile (cell) phone'));
                        }
!                       return 
$this->hash_comms_import[$comm_type][$comm_description];
                }
  
***************
*** 1593,1596 ****
--- 1608,1612 ----
                * @param value $value to assing to field
                * @param mixed &$field_list reference to the list that contain 
$field
+               * @access private
                */
                function explode_field_name($field, $value, &$fields_list)
***************
*** 1600,1603 ****
--- 1616,1620 ----
  
                        list($kind, $key, $name) = explode('_', $field, 3);
+                       echo "$kind : $key : $name<br />\n";
                        switch ($kind)
                        {
***************
*** 2549,2552 ****
--- 2566,2572 ----
                \*************************************************************/
  
+               /address@hidden
+               * @access private
+               */
                /**
                * This function is the wrapper for getting queries or the sql 
string
***************
*** 2556,2560 ****
                * @param integer $file where this function is called, usefull 
for debug
                * @return Array|string Array with records or string with sql 
query
-               * @access private
                */
                function get_query($action=PHPGW_SQL_RUN_SQL, $line=__LINE__, 
$file=__FILE__)
--- 2576,2579 ----
***************
*** 2578,2581 ****
--- 2597,2601 ----
                * @return Recordset with all records in the database.
                */
+ 
                function get_records($line, $file)
                {
***************
*** 2617,2620 ****
--- 2637,2641 ----
                        }
                }
+               /address@hidden/
  
                /**
***************
*** 2708,2711 ****
--- 2729,2735 ----
                
                // Deprecated
+               /**
+               * @deprecated 
+               */
                function get_phone_by_contact($contacts_id)
                {
***************
*** 2828,2831 ****
--- 2852,2856 ----
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
                * @return Array ?with what? FIXME
+               * @access private
                */
                function _get_categories($person_id, $data, 
$action=PHPGW_SQL_RUN_SQL)
***************
*** 3318,3321 ****
--- 3343,3349 ----
                }
  
+               /**
+               * @access private
+               */
                function _add($data, $object, $key_field, $cid = '', 
$action=PHPGW_SQL_RETURN_SQL)
                {
***************
*** 3360,3363 ****
--- 3388,3392 ----
                * 
                * Create de database if necesary
+               * @access private
                */
                function transaction_begin()
***************
*** 3376,3379 ****
--- 3405,3409 ----
                /**
                * End actual Transaction
+               * @access private
                */
                function transaction_end()
***************
*** 3399,3403 ****
                        }
                }
!               
                function unlock_table()
                {
--- 3429,3436 ----
                        }
                }
! 
!               /**
!               * @access private
!               */
                function unlock_table()
                {
***************
*** 3410,3413 ****
--- 3443,3450 ----
                        }
                }
+ 
+               /**
+               * @access private
+               */
                function slice_old_fields($fields, $data_type)
                {
***************
*** 3483,3487 ****
                *
                * @param integer $org_id  The organization id which want to 
check.
!               * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
                * @return integer The addr_id.
                */
--- 3520,3524 ----
                *
                * @param integer $org_id  The organization id which want to 
check.
!               * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
                * @return integer The addr_id.
                */





reply via email to

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