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


From: nomail
Subject: [Phpgroupware-cvs] phpgwapi/inc/class.contacts_sql.inc.php, 1.17.2.2.2.65
Date: Mon, 28 Jun 2004 09:08:09 +0200

Update of /phpgwapi/inc
Modified Files:
        Branch: Version-0_9_16-branch
          class.contacts_sql.inc.php

date: 2004/06/28 07:08:09;  author: powerstat;  state: Exp;  lines: +137 -146

Log Message:
phpdoc update
=====================================================================
Index: phpgwapi/inc/class.contacts_sql.inc.php
diff -u phpgwapi/inc/class.contacts_sql.inc.php:1.17.2.2.2.64 
phpgwapi/inc/class.contacts_sql.inc.php:1.17.2.2.2.65
--- phpgwapi/inc/class.contacts_sql.inc.php:1.17.2.2.2.64       Wed Jun 23 
08:24:02 2004
+++ phpgwapi/inc/class.contacts_sql.inc.php     Mon Jun 28 07:08:09 2004
@@ -813,18 +813,17 @@
                }
 
                /**
+               * Read fields from database
                *
-               *
-               * @param $start
-               * @param $limit
-               * @param $fields
-               * @param $query
-               * @param $filter
-               * @param $sort
-               * @param $order
-               * @param $lastmod
-               * @return
-               * @internal Send this the range, query, sort, order and 
whatever fields you want to see
+               * @param integer $start Start position in database result
+               * @param integer $limit Number of values wanted
+               * @param array $fields Fields to read from database
+               * @param string $query Unused
+               * @param string $filter Unused
+               * @param string $sort Unused
+               * @param string $order Unused
+               * @param integer $lastmod Unused
+               * @return array Array with database fields
                * @deprecated
                * @access private
                */
@@ -868,13 +867,13 @@
                }
 
                /**
+               * Add contact by importing it and adding a new organization 
when required
                *
-               *
-               * @param $owner
-               * @param $fields
-               * @param $access
-               * @param $cat_id
-               * @param $tid
+               * @param string $owner Unused
+               * @param array $fields Fields to import
+               * @param mixed $access Access rights
+               * @param integer $cat_id Category ID
+               * @param integer $tid Unused
                * @deprecated This method is for old import only, I ask help to 
code a new one
                * @access private
                */
@@ -918,11 +917,11 @@
                }
 
                /**
+               * Test existence of a field in a contact
                *
-               *
-               * @param $id
-               * @param $field_name
-               * @return
+               * @param integer $id Contact ID
+               * @param string $field_name Field name which should be tested
+               * @return integer Number of existing rows
                * @deprecated
                * @access private
                */
@@ -938,12 +937,12 @@
                }
 
                /**
+               * Add one extra field to a contact
                *
-               *
-               * @param $id
-               * @param $owner
-               * @param $field_name
-               * @param $field_value
+               * @param integer $id Contact ID
+               * @param integer $owner Unused
+               * @param string $field_name Field name
+               * @param string $field_value Field value
                * @deprecated
                * @access private
                */
@@ -954,11 +953,11 @@
                }
 
                /**
+               * Delete one extra field from a contact
                *
-               *
-               * @param $id
-               * @param $field_name
-               * @return
+               * @param $id Contact ID
+               * @param $field_name Field name to delete
+               * @return array Empty array
                * @deprecated
                * @access private
                */
@@ -969,14 +968,14 @@
                }
 
                /**
+               * Update contact entry
                *
-               *
-               * @param $id
-               * @param $owner
-               * @param $fields
-               * @param $access
-               * @param $cat_id
-               * @param $tid
+               * @param integer $id Contact ID
+               * @param integer $owner Owner of contact
+               * @param array $fields Fields to update
+               * @param mixed $access Unused
+               * @param integer $cat_id Unused
+               * @param integer $tid Unused
                * @deprecated
                * @access private
                */
@@ -1012,9 +1011,9 @@
                }
 
                /**
+               * Echoes "don't use this"
                *
-               *
-               * @param $id
+               * @param integer $id Unused
                * @deprecated
                * @access private
                */
@@ -1024,11 +1023,11 @@
                }
 
                /**
+               * Update one extra field of a contact
                *
-               *
-               * @param $id
-               * @param $name
-               * @param $value
+               * @param integer $id Contact ID
+               * @param string $name Field name
+               * @param string $value Field value
                * @deprecated
                * @access private
                */
@@ -1142,7 +1141,7 @@
                * @param mixed $person_id Organizations Id which want 
information.
                * @param string $criteria
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return array Asociat ive with id and all data that you 
requested
+               * @return array Asociative array with id and all data that you 
requested
                */
                function get_organizations_by_person($person_id, $criteria ='', 
$action=PHPGW_SQL_RUN_SQL)
                {
@@ -1722,11 +1721,12 @@
                }
 
                /**
+               * Get communication description string.
                *
-               *
-               * @param string $comm_type
-               * @param string $comm_description
-               * @return
+               * When there are no communication types available create them.
+               * @param string $comm_type Communication Type
+               * @param string $comm_description Communication location
+               * @return string Communication description
                * @access private
                */
                function comms_fixed($comm_type, $comm_description)
@@ -2019,12 +2019,11 @@
                /**
                * Allow edit information of an existent contact
                *
-               * Allow edit many communications media, locations, categories 
and others fields,
-               * that already exist for a given contact.
+               * Allow edit many communications media, locations, categories 
and others fields, that already exist for a given contact.
                * @param integer $cid Contact Id that want to be edited.
                * @param array $principal Principal information for contact, 
its depends on $type, but is according which each definition
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return string SQL update string
                */
                function edit_contact($cid, $principal, 
$action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2046,7 +2045,7 @@
                * @param integer $id Person Id that want to be edited.
                * @param array $data Principal information for person
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return string SQL update string
                */
                function edit_person($id, $data, $action=PHPGW_SQL_RUN_SQL)
                {
@@ -2068,7 +2067,7 @@
                * @param integer $id Org Id that want to be edited.
                * @param array $data Information for contact
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return string SQL update string
                */
                function edit_org($id, $data, $action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2091,7 +2090,7 @@
                * @param integer $id Contact location Id that want to be edited.
                * @param array $data Information for contact
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return string SQL update string
                */
                function edit_location($id, $data, $action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2113,7 +2112,7 @@
                * @param integer $id Contact comm Id that want to be edited.
                * @param array $data Information for contact
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return string SQL update string
                */
                function edit_comms($id, $data, $action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2135,7 +2134,7 @@
                * @param integer $id Contact other Id that want to be edited.
                * @param array $data Information for contact
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return string SQL update string
                */
                function edit_other($id, $data, $action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2149,7 +2148,7 @@
                * @param integer $id Contact Id that want to be edited.
                * @param array $data Information for contact
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return string SQL update string
                */
                function edit_comms_by_contact($id, $data, 
$action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2164,7 +2163,7 @@
                * @param integer $person_id Person Id that want to be edited.
                * @param array $data Information for contact
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return string SQL update string
                */
                function edit_org_person_relation($org_id='', $person_id='', 
$data=array(), $action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2191,7 +2190,7 @@
                *
                * @param integer $old_owner Current owner
                * @param integer $new_owner New owner, wath you want to have 
now.
-               * @return
+               * @return string SQL update string
                */
                function change_owner($old_owner='',$new_owner='')
                {
@@ -2210,7 +2209,7 @@
                *
                * @param integer $old_owner Current owner
                * @param integer $new_owner New owner, wath you want to have 
now.
-               * @return
+               * @return string SQL update string
                */
                function change_owner_others($old_owner='',$new_owner='')
                {
@@ -2232,7 +2231,7 @@
                * @param string $old_data The current value which you want to 
update.
                * @param string $field_data The field is can be other_name or 
other_value
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return string SQL update string
                */
                function edit_other_by_owner($id, $new_data, $old_data, 
$field_data, $action=PHPGW_SQL_RUN_SQL)
                {
@@ -2248,7 +2247,7 @@
                * @param integer $cid The contact_id what you want to edit
                * @param array $categories The new categories
                * @param $action
-               * @return
+               * @return string SQL update string
                */
                function edit_category($cid, $categories=array(), 
$action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2270,7 +2269,7 @@
                 * @param array $others Others fields to be added.
                 * @param array $contact_relations the org_id or the person_id 
for this person or organzation
                 * @param array $notes Notes to be added.
-                * @return array With person_id, account_person_id and all data 
of contacts that we wanted.
+                * @return integer New contact ID
                 */
                function add_contact($type, $principal=array(), $comms=array(), 
$locations=array(), $categories=array(), $others=array(), 
$contact_relations=array(), $notes=array())
                {
@@ -2339,12 +2338,12 @@
                }
 
                /**
-               * Add a org and it's data
+               * Add an organization and it's data
                *
-               * @param array $principal Principal information for org
-               * @param integer $cid  org id
+               * @param array $principal Principal information for organization
+               * @param integer $cid Organization id
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return SQL insert string or nothing
                */
                function add_org($principal, $cid, $action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2370,7 +2369,7 @@
                * @param array $principal Principal information for person
                * @param integer $cid  person id
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return SQL insert string or nothing
                */
                function add_person($principal, $cid, 
$action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2397,7 +2396,7 @@
                * @param array $people People id which you want to insert
                * @param integer $cid Organization id
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return SQL insert string or nothing
                */
                function add_people_for_organzation($people, $cid, 
$action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2443,7 +2442,7 @@
                * @param integer $addr_id Address id from preferred organization
                * @param integer $cid Person id
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return SQL insert string or nothing
                */
                function add_orgs_for_person($organizations, $preferred_org, 
$addr_id, $cid, $action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2481,7 +2480,7 @@
                * @param array $location Locations information for contact
                * @param integer $cid contact id
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return SQL insert string or nothing
                */
                function add_location($location, $cid, 
$action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2515,7 +2514,7 @@
                * @param array $comm Communications information for contact
                * @param integer $cid  contact id
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return SQL insert string or nothing
                */
                function add_communication_media($comm, $cid = '', 
$action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2541,7 +2540,7 @@
                * @param array $note Note information for contact
                * @param integer $cid  contact id
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return SQL insert string or nothing
                */
                function add_note($note, $cid = '', 
$action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2567,7 +2566,7 @@
                * @param array $others Others information for contact
                * @param integer $cid contact id
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return
+               * @return SQL insert string or nothing
                */
                function add_others($others, $cid='', 
$action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2588,8 +2587,8 @@
                *
                * @param mixed $cid The contact_id or any list of contacts_id
                * @param string $contact_type Contact type
-               * @param boolean $transaction
-               * @return
+               * @param boolean $transaction Use transaction
+               * @return boolean|array Error reason strings from different 
applications
                */
                function delete($cid, $contact_type='', $transaction=True)
                {
@@ -2660,7 +2659,7 @@
                * @param mixed $cid The contact_id or any list of contacts_id
                * @param mixed $contact_type Contact type
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL
-               * @return
+               * @return boolean|array Error reason strings from different 
applications
                */
                function delete_contact($cid, $contact_type='', 
$action=PHPGW_SQL_RUN_SQL)
                {
@@ -2708,7 +2707,7 @@
                *
                * @param mixed $cid The contact_id or any list of contacts_id
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL
-               * @return
+               * @return string Delete SQL string
                */
                function delete_orgs_by_person($cid, $action=PHPGW_SQL_RUN_SQL)
                {
@@ -2720,7 +2719,7 @@
                *
                * @param mixed $cid The contact_id or any list of contacts_id
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL
-               * @return
+               * @return string Delete SQL string
                */
                function delete_people_by_org($cid, $action=PHPGW_SQL_RUN_SQL)
                {
@@ -2733,7 +2732,7 @@
                * @param mixed $org_id
                * @param mixed $person_id
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL
-               * @return
+               * @return string Delete SQL string
                */
                function delete_org_person_relation($org_id, $person_id, 
$action=PHPGW_SQL_RUN_SQL)
                {
@@ -2751,7 +2750,7 @@
                *
                * @param integer|array $cid contact_id or list of contact_ids
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL
-               * @return
+               * @return string Delete SQL string
                */
                function delete_locations($cid, $action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2763,7 +2762,7 @@
                *
                * @param integer|array $cid contact_id or list of contact_ids
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL
-               * @return
+               * @return string Delete SQL string
                */
                function delete_comms($cid, $action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2775,7 +2774,7 @@
                *
                * @param integer|array $cid contact_id or list of contact_ids
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL
-               * @return
+               * @return string Delete SQL string
                */
                function delete_others($cid, $action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2787,7 +2786,7 @@
                *
                * @param integer|array $cid Contact_id or list of contact_ids
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL
-               * @return
+               * @return string Delete SQL string
                */
                function delete_notes($cid, $action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2799,7 +2798,7 @@
                *
                * @param integer|array $id Key of the comm media what you want
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL
-               * @return
+               * @return string Delete SQL string
                */
                function delete_specified_comm($id, 
$action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2811,7 +2810,7 @@
                *
                * @param integer|array $id Key of the address what you want
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL
-               * @return
+               * @return string Delete SQL string
                */
                function delete_specified_location($id, 
$action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2823,7 +2822,7 @@
                *
                * @param integer|array $id Key of the other field what you want
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL
-               * @return
+               * @return string Delete SQL string
                */
                function delete_specified_other($id, 
$action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2835,7 +2834,7 @@
                *
                * @param integer|array $id Key of the note what you want
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL
-               * @return
+               * @return string Delete SQL string
                */
                function delete_specified_note($id, 
$action=PHPGW_SQL_RETURN_SQL)
                {
@@ -2843,9 +2842,9 @@
                }
 
                /**
+               * Delete all contacts of an owner
                *
-               *
-               * @param integer $owner
+               * @param integer $owner Ownder of contacts
                * @internal This is for the admin script deleteaccount.php
                */
                function delete_all($owner=0)
@@ -2905,12 +2904,12 @@
                }
 
                /**
+               * Get records from database for one field
                *
-               *
-               * @param $field
-               * @param $line
-               * @param $file
-               * @return
+               * @param string $field Database field name
+               * @param integer $line Program line number that executes this 
method
+               * @param string $file File name from which this method was 
called
+               * @return array Database results for given field name
                * @access private
                */
                function get_records_by_field($field, $line=__LINE__, 
$file=__FILE__)
@@ -2924,11 +2923,11 @@
                }
 
                /**
+               * Execute SQL query string
                *
-               *
-               * @param $query
-               * @param $line
-               * @param $file
+               * @param string $query SQL query string
+               * @param integer $line Program line number that executes this 
method
+               * @param string $file File name from which this method was 
called
                * @access private
                */
                function execute_query($query, $line=__LINE__, $file=__FILE__)
@@ -2941,9 +2940,9 @@
                }
 
                /**
+               * Execute a list of SQL queries
                *
-               *
-               * @param $queries
+               * @param array $queries List of SQL queries
                * @access private
                */
                function execute_queries($queries=array())
@@ -3055,9 +3054,9 @@
 
 
                /**
+               * Read phone number for one contact
                *
-               *
-               * @param $contacts_id
+               * @param $contacts_id Contact ID
                * @deprecated
                */
                function get_phone_by_contact($contacts_id)
@@ -3069,8 +3068,8 @@
                /**
                * Create a criteria with or and like operators for all the 
fields
                *
-               * @param array $fields
-               * @return
+               * @param array $fields Database field names
+               * @return string Search result
                */
                function search_by_any($fields)
                {
@@ -3102,8 +3101,8 @@
                /**
                * Create a criteria with `and' and the corresponding operator 
of each field.
                *
-               * @param array $fields
-               * @return
+               * @param array $fields Database field names
+               * @return string Search result
                */
                function search_by_all($fields)
                {
@@ -3184,7 +3183,7 @@
                * @param mixed $person_id Contacts Id which want his categories.
                * @param mixed $data list of fields that we want retrieve
                * @param integer $action PHPGW_SQL_RETURN_SQL | 
PHPGW_SQL_RUN_SQL depending what we want
-               * @return array
+               * @return array|string Array with records or string with SQL 
query
                * @access private
                */
                function _get_categories($person_id, $data, 
$action=PHPGW_SQL_RUN_SQL)
@@ -3331,10 +3330,10 @@
                }
 
                /**
-               * Get the orgs from one person
+               * Get the organizations from one person
                *
                * @param integer $person_id Id of the contact type person
-               * @return
+               * @return array Asociative array with id and all data that you 
requested
                */
                function get_orgs_by_person($person_id)
                {
@@ -3423,8 +3422,8 @@
                * all fields of $search_fields, set value to this param without
                * setting $search_field is useless.
                *
-               * @param array $show_fields
-               * @return
+               * @param array $show_fields Database fields to show
+               * @return string SQL string
                */
                function criteria_for_index($owner, $access=PHPGW_CONTACTS_ALL, 
$categories=PHPGW_CONTACTS_CATEGORIES_ALL, $search_fields=array(), $pattern='', 
$show_fields=array())
                {
@@ -3578,7 +3577,7 @@
                * @param integer $contact_id The contact_id which you want to 
find
                * @param integer $needed The permission what you need
                * @param integer $owner_id The owner_id of the contact
-               * @return boolean
+               * @return boolean True when access is allowed otherwise false
                */
                function check_acl($contact_id, $needed, $owner_id='')
                {
@@ -3587,14 +3586,7 @@
                        {
                                $owner_id = 
$this->get_contact_owner($contact_id);
                        }
-                       if($this->check_perms($grants[$owner_id], $needed) || 
$GLOBALS['phpgw']->acl->check('addressmaster', 7, 'addressbook'))
-                       {
-                               return True;
-                       }
-                       else
-                       {
-                               return False;
-                       }
+                       return($this->check_perms($grants[$owner_id],$needed) 
|| $GLOBALS['phpgw']->acl->check('addressmaster',7,'addressbook'));
                }
 
                /**
@@ -3602,7 +3594,7 @@
                *
                * @param integer $contact_id The contact_id which you want to 
check
                * @param integer $owner_id The owner_id of the contact which 
you want to check
-               * @return
+               * @return boolean True when when adding to this contact is 
allowed otherwise false
                */
                function check_add($contact_id, $owner_id='')
                {
@@ -3614,7 +3606,7 @@
                *
                * @param integer $contact_id The contact_id which you want to 
check
                * @param integer $owner_id The owner_id of the contact which 
you want to check
-               * @return
+               * @return boolean True when editing this contact is allowed 
otherwise false
                */
                function check_edit($contact_id, $owner_id='')
                {
@@ -3626,7 +3618,7 @@
                *
                * @param integer $contact_id The contact_id which you want to 
check
                * @param integer $owner_id The owner_id of the contact which 
you want to check
-               * @return
+               * @return boolean TRue when reading this contact is allowed 
otherwise false
                */
                function check_read($contact_id, $owner_id='')
                {
@@ -3638,7 +3630,7 @@
                *
                * @param integer $contact_id The contact_id which you want to 
check
                * @param integer $owner_id The owner_id of the contact which 
you want to check
-               * @return
+               * @return boolean True when deleting this contact is allowed 
otherwise false
                */
                function check_delete($contact_id, $owner_id='')
                {
@@ -3649,7 +3641,7 @@
                * Get the owner of the contact.
                *
                * @param integer $contact_id The contact_id which you want to 
find
-               * @return
+               * @return integer Owner of the given contact
                */
                function get_contact_owner($contact_id)
                {
@@ -3756,14 +3748,14 @@
                }
 
                /**
+               * Create insert SQL statement to insert data from object
                *
-               *
-               * @param $data
-               * @param $object
-               * @param $key_field
-               * @param $cid
-               * @param $action
-               * @return
+               * @param mixed $data Data
+               * @param mixed $object Object
+               * @param string $key_field Key for associatove array
+               * @param integer $cid Value for key
+               * @param mixed $action Unknown
+               * @return string Insert SQL string or nothing
                * @access private
                */
                function _add($data, $object, $key_field, $cid = '', 
$action=PHPGW_SQL_RETURN_SQL)
@@ -3787,7 +3779,7 @@
                * Display the correct translation for the field
                *
                * @param string $field The field what you want
-               * @return
+               * @return string Translated field name for display
                */
                function display_name($field)
                {
@@ -3853,7 +3845,7 @@
                }
 
                /**
-               *
+               * Unlock database table
                *
                * @access private
                */
@@ -3869,11 +3861,11 @@
                }
 
                /**
+               * Unknown
                *
-               *
-               * @param $fields
-               * @param $data_type
-               * @return array
+               * @param array $fields Database field names
+               * @param string $data_type Unknown
+               * @return array Array with 'comms','locations' and 'others'
                * @access private
                */
                function slice_old_fields($fields, $data_type)
@@ -4128,14 +4120,13 @@
                        //die('debug');
                }
                /**
-               * Method that could be used to import field, from an array with 
the specified form.
+               * Method that could be used to import fields from an array with 
the specified form.
                *
                * This is the only one method that provide the fullfill fields 
for contact.
-               *
-               * @param $fields
-               * @param $type
-               * @param $update
-               * @return
+               * @param array $fields Field names to import
+               * @param string $type Type of given communications
+               * @param boolean $update True: update existing entry; False: 
overwrite
+               * @return integer New contact ID or -1 on error
                */
                function contact_import($fields, $type = '', $update=false)
                {




reply via email to

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