[Vtigercrm-commits] [vtiger-commits] r8038 - in /vtigercrm/trunk/include/utils: CommonUtils.php ListViewUtils.php utils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Jul 13 19:47:08 EDT 2006


Author: saraj
Date: Thu Jul 13 17:47:03 2006
New Revision: 8038

Log:
API added for functions

Modified:
    vtigercrm/trunk/include/utils/CommonUtils.php
    vtigercrm/trunk/include/utils/ListViewUtils.php
    vtigercrm/trunk/include/utils/utils.php

Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Thu Jul 13 17:47:03 2006
@@ -2178,6 +2178,8 @@
 	$log->debug("Exiting getEntityName method ...");
 }
 
+/**Function to get all permitted modules for a user with their parent
+*/
 
 function getAllParenttabmoduleslist()
 {

Modified: vtigercrm/trunk/include/utils/ListViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/ListViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/ListViewUtils.php Thu Jul 13 17:47:03 2006
@@ -1535,7 +1535,11 @@
 	return $value; 
 }
 
-
+/** Function to get the list query for a module
+  * @param $module -- module name:: Type string
+  * @param $where -- where:: Type string
+  * @returns $query -- query:: Type query 
+  */
 function getListQuery($module,$where='')
 {
 	global $log;
@@ -2055,6 +2059,10 @@
 	return $query;
 }
 
+/**Function returns the list of records which an user is entiled to view
+*Param $module - module name
+*Returns a database query - type string
+*/
 
 function getReadEntityIds($module)
 {
@@ -2228,8 +2236,20 @@
 
 }
 
-
-//parameter $viewid added for vtiger_customview 27/5
+/** Function to get alphabetical search links
+*Param $module - module name
+*Param $action - action
+*Param $fieldname - vtiger_field name
+*Param $query - query
+*Param $type - search type
+*Param $popuptype - popup type
+*Param $recordid - record id
+*Param $return_module - return module
+*Param $append_url - url string to be appended 
+*Param $viewid - custom view id
+*Param $groupid - group id
+*Returns an string value
+ */
 function AlphabeticalSearch($module,$action,$fieldname,$query,$type,$popuptype='',$recordid='',$return_module='',$append_url='',$viewid='',$groupid='')
 {
 	global $log;
@@ -2253,7 +2273,12 @@
 	return $list;
 }
 
-
+/**Function to get parent name for a given parent id
+*Param $module - module name 
+*Param $list_result- result set
+*Param $rset - result set index
+*Returns an string value
+*/
 function getRelatedToEntity($module,$list_result,$rset)
 {
 	global $log;
@@ -2330,6 +2355,12 @@
 
 }
 
+/**Function to get parent name for a given parent id
+*Param $module - module name 
+*Param $list_result- result set
+*Param $rset - result set index
+*Returns an string value
+*/
 
 //used in home page listTop vtiger_files
 function getRelatedTo($module,$list_result,$rset)
@@ -2464,6 +2495,15 @@
 
 }
 
+/**Function to get the table headers for a listview
+*Param $navigation_arrray - navigation values in array 
+*Param $url_qry - url string 
+*Param $module - module name 
+*Param $action- action file name
+*Param $viewid - view id
+*Returns an string value
+*/
+
 
 function getTableHeaderNavigation($navigation_array, $url_qry,$module='',$action_val='index',$viewid='')
 {
@@ -2605,9 +2645,13 @@
 	return $where_relquery;
 }
 
-/**This function stores the variables sent in list view url string.
-Param $lv_array - list view session array
-Return type void.
+/**This function stores the variables in session sent in list view url string.
+*Param $lv_array - list view session array
+*Param $noofrows - no of rows
+*Param $max_ent - maximum entires
+*Param $module - module name
+*Param $related - related module
+*Return type void.
 */
 
 function setSessionVar($lv_array,$noofrows,$max_ent,$module='',$related='')
@@ -2644,6 +2688,15 @@
 			$_SESSION['lvs'][$currentModule]['start'] = $start;
 	}
 }
+
+/**Function to get the table headers for related listview
+*Param $navigation_arrray - navigation values in array 
+*Param $url_qry - url string 
+*Param $module - module name 
+*Param $action- action file name
+*Param $viewid - view id
+*Returns an string value
+*/
 
 //Temp function to be be deleted
 function getRelatedTableHeaderNavigation($navigation_array, $url_qry,$module='',$action_val='CallRelatedList',$viewid='')

Modified: vtigercrm/trunk/include/utils/utils.php
==============================================================================
--- vtigercrm/trunk/include/utils/utils.php (original)
+++ vtigercrm/trunk/include/utils/utils.php Thu Jul 13 17:47:03 2006
@@ -41,7 +41,14 @@
   require_once('include/utils/DeleteUtils.php');
   require_once('include/utils/SearchUtils.php');
   require_once('include/FormValidationUtil.php');
-  
+ 
+/** Function to return a full name
+  * @param $row -- row:: Type integer
+  * @param $first_column -- first column:: Type string
+  * @param $last_column -- last column:: Type string
+  * @returns $fullname -- fullname:: Type string 
+  *
+*/
 function return_name(&$row, $first_column, $last_column)
 {
 	global $log;
@@ -79,7 +86,11 @@
 	return $full_name;
 }
 
-//login utils
+/** Function to return language 
+  * @returns $languages -- languages:: Type string 
+  *
+*/
+
 function get_languages()
 {
 	global $log;
@@ -89,6 +100,12 @@
 	return $languages;
 }
 
+/** Function to return language 
+  * @param $key -- key:: Type string
+  * @returns $languages -- languages:: Type string 
+  *
+*/
+
 //seems not used
 function get_language_display($key)
 {
@@ -99,6 +116,12 @@
 	return $languages[$key];
 }
 
+/** Function returns the user array 
+  * @param $assigned_user_id -- assigned_user_id:: Type string
+  * @returns $user_list -- user list:: Type array 
+  *
+*/
+
 function get_assigned_user_name(&$assigned_user_id)
 {
 	global $log;
@@ -113,6 +136,15 @@
 	$log->debug("Exiting get_assigned_user_name method ...");
 	return "";
 }
+
+/** Function returns the user key in user array 
+  * @param $add_blank -- boolean:: Type boolean
+  * @param $status -- user status:: Type string
+  * @param $assigned_user -- user id:: Type string
+  * @param $private -- sharing type:: Type string
+  * @returns $user_array -- user array:: Type array 
+  *
+*/
 
 //used in module file
 function get_user_array($add_blank=true, $status="Active", $assigned_user="",$private="")
@@ -176,6 +208,13 @@
 	return $user_array;
 }
 
+/** Function skips executing arbitary commands given in a string
+  * @param $string -- string:: Type string
+  * @param $maxlength -- maximun length:: Type integer
+  * @returns $string -- escaped string:: Type string 
+  *
+*/
+
 function clean($string, $maxLength)
 {
 	global $log;
@@ -539,6 +578,10 @@
 
 }
 
+/** Function to create guid section for a given character
+  * @param $characters -- characters:: Type string
+  * @returns $return -- integer:: Type integer``
+  */
 function create_guid_section($characters)
 {
 	global $log;
@@ -551,6 +594,11 @@
 	$log->debug("Exiting create_guid_section method ...");
 	return $return;
 }
+
+/** Function to ensure length
+  * @param $string -- string:: Type string
+  * @param $length -- length:: Type string
+  */
 
 function ensure_length(&$string, $length)
 {
@@ -752,7 +800,9 @@
    return $marray;
 }
 
-
+/** Function to set default varibles on to the global variable
+  * @param $defaults -- default values:: Type array
+       */
 function set_default_config(&$defaults)
 {
 	global $log;
@@ -776,6 +826,12 @@
         "'" =>  ''',
 );
 
+/** Function to convert the given string to html
+  * @param $string -- string:: Type string
+  * @param $ecnode -- boolean:: Type boolean
+    * @returns $string -- string:: Type string 
+      *
+       */
 function to_html($string, $encode=true){
 	global $log;
 	$log->debug("Entering to_html(".$string.",".$encode.") method ...");
@@ -787,6 +843,12 @@
         return $string;
 }
 
+/** Function to get the assigned user name or group name
+  * @param $id -- user id:: Type integer
+  * @param $module -- module name:: Type string
+    * @returns $string -- string:: Type string 
+      *
+       */
 
 //it seems the fun ction is not used
 function get_assigned_user_or_group_name($id,$module)
@@ -818,6 +880,12 @@
 	return $tempval[0];
 }
 
+/** Function to get the tabname for a given id
+  * @param $tabid -- tab id:: Type integer
+    * @returns $string -- string:: Type string 
+      *
+       */
+
 function getTabname($tabid)
 {
 	global $log;
@@ -832,6 +900,12 @@
 
 }
 
+/** Function to get the tab module name for a given id
+  * @param $tabid -- tab id:: Type integer
+    * @returns $string -- string:: Type string 
+      *
+       */
+
 function getTabModuleName($tabid)
 {
 	global $log;
@@ -854,6 +928,11 @@
         return $tabname;
 }
 
+/** Function to get column fields for a given module
+  * @param $module -- module:: Type string
+    * @returns $column_fld -- column field :: Type array 
+      *
+       */
 
 function getColumnFields($module)
 {
@@ -874,6 +953,12 @@
 	$log->debug("Exiting getColumnFields method ...");
 	return $column_fld;	
 }
+
+/** Function to get a users's mail id
+  * @param $userid -- userid :: Type integer
+    * @returns $email -- email :: Type string 
+      *
+       */
 
 function getUserEmail($userid)
 {
@@ -891,6 +976,12 @@
 	$log->debug("Exiting getUserEmail method ...");
         return $email;
 }		
+
+/** Function to get a userid for outlook
+  * @param $username -- username :: Type string
+    * @returns $user_id -- user id :: Type integer 
+       */
+
 //outlook security
 function getUserId_Ol($username)
 {
@@ -913,6 +1004,13 @@
 	$log->debug("Exiting getUserId_Ol method ...");
 	return $user_id;
 }	
+
+
+/** Function to get a action id for a given action name
+  * @param $action -- action name :: Type string
+    * @returns $actionid -- action id :: Type integer 
+       */
+
 //outlook security
 
 function getActionid($action)
@@ -931,6 +1029,10 @@
 	return $actionid;
 }
 
+/** Function to get a action for a given action id
+  * @param $action id -- action id :: Type integer
+    * @returns $actionname-- action name :: Type string 
+       */
 
 
 function getActionname($actionid)
@@ -947,6 +1049,10 @@
 	return $actionname;
 }
 
+/** Function to get a assigned user id for a given entity
+  * @param $record -- entity id :: Type integer
+    * @returns $user_id -- user id :: Type integer 
+       */
 
 function getUserId($record)
 {
@@ -959,6 +1065,11 @@
 	$log->debug("Exiting getUserId method ...");
 	return $user_id;	
 }
+
+/** Function to get a user id or group id for a given entity
+  * @param $record -- entity id :: Type integer
+    * @returns $ownerArr -- owner id :: Type array 
+       */
 
 function getRecordOwnerId($record)
 {
@@ -1034,6 +1145,10 @@
 
 }
 
+/** Function to insert value to profile2field table
+  * @param $profileid -- profileid :: Type integer
+       */
+
 
 function insertProfile2field($profileid)
 {
@@ -1054,6 +1169,9 @@
 	$log->debug("Exiting insertProfile2field method ...");
 }
 
+/** Function to insert into default org field
+       */
+
 function insert_def_org_field()
 {
 	global $log;
@@ -1071,6 +1189,12 @@
 	$log->debug("Exiting insert_def_org_field() method ...");
 }
 
+/** Function to insert value to profile2field table
+  * @param $fld_module -- field module :: Type string
+  * @param $profileid -- profileid :: Type integer
+  * @returns $result -- result :: Type string
+  */
+	 
 function getProfile2FieldList($fld_module, $profileid)
 {
 	global $log;
@@ -1085,6 +1209,12 @@
 	$log->debug("Exiting getProfile2FieldList method ...");
 	return $result;
 }
+
+/** Function to insert value to profile2fieldPermissions table
+  * @param $fld_module -- field module :: Type string
+  * @param $profileid -- profileid :: Type integer
+  * @returns $return_data -- return_data :: Type string
+  */
 
 //added by jeri
 
@@ -1108,6 +1238,12 @@
 	return $return_data;
 }
 
+/** Function to getProfile2allfieldsListinsert value to profile2fieldPermissions table
+  * @param $mod_array -- mod_array :: Type string
+  * @param $profileid -- profileid :: Type integer
+  * @returns $profilelist -- profilelist :: Type string
+  */
+
 function getProfile2AllFieldList($mod_array,$profileid)
 {
 	global $log;
@@ -1124,6 +1260,11 @@
 	$log->debug("Exiting getProfile2AllFieldList method ...");
 	return $profilelist;	
 }
+
+/** Function to getdefaultfield organisation list for a given module
+  * @param $fld_module -- module name :: Type string
+  * @returns $result -- string :: Type object
+  */
 
 //end of fn added by jeri
 
@@ -1142,6 +1283,12 @@
 	return $result;
 }
 
+/** Function to getQuickCreate for a given tabid
+  * @param $tabid -- tab id :: Type string
+  * @param $actionid -- action id :: Type integer
+  * @returns $QuickCreateForm -- QuickCreateForm :: Type boolean
+  */
+
 function getQuickCreate($tabid,$actionid)
 {
 	global $log;
@@ -1159,6 +1306,13 @@
 	return $QuickCreateForm;
 
 }
+
+/** Function to getQuickCreate for a given tabid
+  * @param $tabid -- tab id :: Type string
+  * @param $actionid -- action id :: Type integer
+  * @returns $QuickCreateForm -- QuickCreateForm :: Type boolean
+  */
+
 function ChangeStatus($status,$activityid,$activity_mode='')
  {
 	global $log;
@@ -1180,6 +1334,10 @@
 	$log->debug("Exiting ChangeStatus method ...");
  }
 
+/** Function to set date values compatible to database (YY_MM_DD)
+  * @param $value -- value :: Type string
+  * @returns $insert_date -- insert_date :: Type string
+  */
 
 function getDBInsertDateValue($value)
 {
@@ -1214,6 +1372,11 @@
 	return $insert_date;
 }
 
+/** Function to get unitprice for a given product id
+  * @param $productid -- product id :: Type integer
+  * @returns $up -- up :: Type string
+  */
+
 function getUnitPrice($productid)
 {
 	global $log,$current_user;
@@ -1232,6 +1395,11 @@
         return $up;
 }
 
+/** Function to upload product image file 
+  * @param $mode -- mode :: Type string
+  * @param $id -- id :: Type integer
+  * @returns $ret_array -- return array:: Type array
+  */
 
 function upload_product_image_file($mode,$id)
 {
@@ -1282,6 +1450,12 @@
 
 }
 
+/** Function to upload product image file 
+  * @param $id -- id :: Type integer
+  * @param $deleted_array -- images to be deleted :: Type array
+  * @returns $imagename -- imagelist:: Type array
+  */
+
 function getProductImageName($id,$deleted_array='')
 {
 	global $log;
@@ -1307,6 +1481,12 @@
 		return $image_name;	
 	}
 }
+
+/** Function to get Contact images 
+  * @param $id -- id :: Type integer
+  * @returns $imagename -- imagename:: Type string
+  */
+
 function getContactImageName($id)
 {
 	global $log;
@@ -1320,6 +1500,17 @@
         return $image_name;
 
 }
+
+/** Function to update sub total in inventory 
+  * @param $module -- module name :: Type string
+  * @param $tablename -- tablename :: Type string
+  * @param $colname -- colname :: Type string
+  * @param $colname1 -- coluname1 :: Type string
+  * @param $entid_fld -- entity field :: Type string
+  * @param $entid -- entid :: Type integer
+  * @param $prod_total -- totalproduct :: Type integer
+  */
+
 function updateSubTotal($module,$tablename,$colname,$colname1,$entid_fld,$entid,$prod_total)
 {
 	global $log;
@@ -1339,6 +1530,13 @@
         $adb->query($sub_query);
 	$log->debug("Exiting updateSubTotal method ...");
 }
+
+/** Function to get Inventory Total 
+  * @param $return_module -- return module :: Type string
+  * @param $id -- entity id :: Type integer
+  * @returns $total -- total:: Type integer
+  */
+
 function getInventoryTotal($return_module,$id)
 {
 	global $log;
@@ -1370,6 +1568,11 @@
 	return $total;
 }
 
+/** Function to update product quantity 
+  * @param $product_id -- product id :: Type integer
+  * @param $upd_qty -- quantity :: Type integer
+  */
+
 function updateProductQty($product_id, $upd_qty)
 {
 	global $log;
@@ -1380,6 +1583,11 @@
 	$log->debug("Exiting updateProductQty method ...");
 
 }
+
+/** Function to get account information 
+  * @param $parent_id -- parent id :: Type integer
+  * @returns $accountid -- accountid:: Type integer
+  */
 
 function get_account_info($parent_id)
 {
@@ -1393,6 +1601,13 @@
         return $accountid;
 }
 
+/** Function to get quick create form fields 
+  * @param $fieldlabel -- field label :: Type string
+  * @param $uitype -- uitype :: Type integer
+  * @param $fieldname -- field name :: Type string
+  * @param $tabid -- tabid :: Type integer
+  * @returns $return_field -- return field:: Type string
+  */
 
 //for Quickcreate-Form
 
@@ -1469,7 +1684,14 @@
 			break;
 	}
 }	
-		
+
+/** Function to get quick create form fields 
+  * @param $label -- field label :: Type string
+  * @param $name -- field name :: Type string
+  * @param $tid -- tabid :: Type integer
+  * @returns $form_field -- return field:: Type string
+  */
+
 function get_textmanField($label,$name,$tid)
 {
 	global $log;
@@ -1505,6 +1727,12 @@
 	
 }	
 
+/** Function to get textfield for website field  
+  * @param $label -- field label :: Type string
+  * @param $name -- field name :: Type string
+  * @returns $form_field -- return field:: Type string
+  */
+
 function get_textwebField($label,$name)
 {
 	global $log;
@@ -1519,6 +1747,12 @@
 	
 }
 
+/** Function to get textfield   
+  * @param $label -- field label :: Type string
+  * @param $name -- field name :: Type string
+  * @returns $form_field -- return field:: Type string
+  */
+
 function get_textField($label,$name)
 {
 	global $log;
@@ -1543,6 +1777,13 @@
 	}
 	
 }
+
+/** Function to get account textfield   
+  * @param $label -- field label :: Type string
+  * @param $name -- field name :: Type string
+  * @param $tid -- tabid :: Type integer
+  * @returns $form_field -- return field:: Type string
+  */
 
 function get_textaccField($label,$name,$tid)
 {
@@ -1573,6 +1814,13 @@
 	}	
 		
 }
+
+/** Function to get combo field values   
+  * @param $label -- field label :: Type string
+  * @param $name -- field name :: Type string
+  * @returns $form_field -- return field:: Type string
+  */
+
 function get_textcomboField($label,$name)
 {
 	global $log;
@@ -1665,6 +1913,13 @@
 	
 }
 
+/** Function to get date field    
+  * @param $label -- field label :: Type string
+  * @param $name -- field name :: Type string
+  * @param $tid -- tabid :: Type integer
+  * @returns $form_field -- return field:: Type string
+  */
+
 
 function get_textdateField($label,$name,$tid)
 {
@@ -1731,6 +1986,12 @@
 	
 }
 
+/** Function to get duration text field in activity  
+  * @param $label -- field label :: Type string
+  * @param $name -- field name :: Type string
+  * @param $tid -- tabid :: Type integer
+  * @returns $form_field -- return field:: Type string
+  */
 
 function get_textdurationField($label,$name,$tid)
 {
@@ -1755,6 +2016,12 @@
 	}	
 }
 
+/** Function to get email text field  
+  * @param $module -- module name :: Type name
+  * @param $id -- entity id :: Type integer
+  * @returns $hidden -- hidden:: Type string
+  */
+
 //Added to get the parents list as hidden for Emails -- 09-11-2005
 function getEmailParentsList($module,$id)
 {
@@ -1851,6 +2118,11 @@
 }
 
 
+/** Function to get header for block in edit/create and detailview  
+  * @param $header_label -- header label :: Type string
+  * @returns $output -- output:: Type string
+  */
+
 function getBlockTableHeader($header_label)
 {
 	global $log;
@@ -1889,6 +2161,13 @@
 	$log->debug("Exiting getTableNameForField method ...");
 	return $tablename;
 }
+
+/** Function to get parent record owner  
+  * @param $tabid -- tabid :: Type integer
+  * @param $parModId -- parent module id :: Type integer
+  * @param $record_id -- record id :: Type integer
+  * @returns $parentRecOwner -- parentRecOwner:: Type integer
+  */
 
 function getParentRecordOwner($tabid,$parModId,$record_id)
 {
@@ -1907,6 +2186,11 @@
 	return $parentRecOwner;
 }
 
+/** Function to get potential related accounts   
+  * @param $record_id -- record id :: Type integer
+  * @returns $accountid -- accountid:: Type integer
+  */
+
 function getPotentialsRelatedAccounts($record_id)
 {
 	global $log;
@@ -1919,6 +2203,10 @@
 	return $accountid;
 }
 
+/** Function to get email related accounts   
+  * @param $record_id -- record id :: Type integer
+  * @returns $accountid -- accountid:: Type integer
+  */
 function getEmailsRelatedAccounts($record_id)
 {
 	global $log;
@@ -1930,6 +2218,10 @@
 	$log->debug("Exiting getEmailsRelatedAccounts method ...");
 	return $accountid;
 }
+/** Function to get email related Leads   
+  * @param $record_id -- record id :: Type integer
+  * @returns $leadid -- leadid:: Type integer
+  */
 
 function getEmailsRelatedLeads($record_id)
 {
@@ -1943,6 +2235,11 @@
 	return $leadid;
 }
 
+/** Function to get HelpDesk related Accounts   
+  * @param $record_id -- record id :: Type integer
+  * @returns $accountid -- accountid:: Type integer
+  */
+
 function getHelpDeskRelatedAccounts($record_id)
 {
 	global $log;
@@ -1955,6 +2252,10 @@
         return $accountid;
 }
 
+/** Function to get Quotes related Accounts   
+  * @param $record_id -- record id :: Type integer
+  * @returns $accountid -- accountid:: Type integer
+  */
 
 function getQuotesRelatedAccounts($record_id)
 {
@@ -1968,6 +2269,10 @@
         return $accountid;
 }
 
+/** Function to get Quotes related Potentials   
+  * @param $record_id -- record id :: Type integer
+  * @returns $potid -- potid:: Type integer
+  */
 
 function getQuotesRelatedPotentials($record_id)
 {
@@ -1981,6 +2286,11 @@
         return $potid;
 }
 
+/** Function to get Quotes related Potentials   
+  * @param $record_id -- record id :: Type integer
+  * @returns $accountid -- accountid:: Type integer
+  */
+
 function getSalesOrderRelatedAccounts($record_id)
 {
 	global $log;
@@ -1993,6 +2303,10 @@
         return $accountid;
 }
 
+/** Function to get SalesOrder related Potentials   
+  * @param $record_id -- record id :: Type integer
+  * @returns $potid -- potid:: Type integer
+  */
 
 function getSalesOrderRelatedPotentials($record_id)
 {
@@ -2005,6 +2319,10 @@
 	$log->debug("Exiting getSalesOrderRelatedPotentials method ...");
         return $potid;
 }
+/** Function to get SalesOrder related Quotes   
+  * @param $record_id -- record id :: Type integer
+  * @returns $qtid -- qtid:: Type integer
+  */
 
 function getSalesOrderRelatedQuotes($record_id)
 {
@@ -2018,6 +2336,11 @@
         return $qtid;
 }
 
+/** Function to get Invoice related Accounts   
+  * @param $record_id -- record id :: Type integer
+  * @returns $accountid -- accountid:: Type integer
+  */
+
 function getInvoiceRelatedAccounts($record_id)
 {
 	global $log;
@@ -2029,6 +2352,10 @@
 	$log->debug("Exiting getInvoiceRelatedAccounts method ...");
         return $accountid;
 }
+/** Function to get Invoice related SalesOrder   
+  * @param $record_id -- record id :: Type integer
+  * @returns $soid -- soid:: Type integer
+  */
 
 function getInvoiceRelatedSalesOrder($record_id)
 {
@@ -2182,6 +2509,10 @@
         return $values;
 }
 
+/** Function to get image count for a given product   
+  * @param $id -- product id :: Type integer
+  * @returns count -- count:: Type integer
+  */
 
 function getImageCount($id)
 {
@@ -2197,6 +2528,12 @@
 	return count($image_lists);
 
 }
+
+/** Function to get user image for a given user   
+  * @param $id -- user id :: Type integer
+  * @returns $image_name -- image name:: Type string
+  */
+
 function getUserImageName($id)
 {
 	global $log;
@@ -2211,6 +2548,9 @@
 
 }
 
+/** Function to get all user images for displaying it in listview   
+  * @returns $image_name -- image name:: Type array
+  */
 
 function getUserImageNames()
 {
@@ -2252,6 +2592,9 @@
     return $text;
 }
 
+/** Function to check whether user has opted for internal mailer
+  * @returns $int_mailer -- int mailer:: Type boolean
+    */
 function useInternalMailer() {
 	global $current_user,$adb;
 	return $adb->query_result($adb->query("select int_mailer from vtiger_mail_accounts where user_id='".$current_user->id."'"),0,"int_mailer");





More information about the vtigercrm-commits mailing list