[Vtigercrm-commits] [vtiger-commits] r9782 - /vtigercrm/branches/5.0.3/include/utils/DetailViewUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Nov 8 02:28:52 EST 2006


Author: richie
Date: Wed Nov  8 00:28:44 2006
New Revision: 9782

Log:
Added function isPresentRelatedLists

Modified:
    vtigercrm/branches/5.0.3/include/utils/DetailViewUtils.php

Modified: vtigercrm/branches/5.0.3/include/utils/DetailViewUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/DetailViewUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/DetailViewUtils.php Wed Nov  8 00:28:44 2006
@@ -1327,6 +1327,30 @@
 	return $focus_list;
 }
 
+/** This function returns whether related lists is present for this particular module or not
+* Param $module - module name
+* Param $activity_mode - mode of activity 
+* Return type true or false
+*/
+
+
+function isPresentRelatedLists($module,$activity_mode='')
+{
+	global $adb;
+	$retval='true';
+	$tab_id=getTabid($module);
+	$query= "select count(*) as count from vtiger_relatedlists where tabid=".$tab_id;
+	$result=$adb->query($query);
+	$count=$adb->query_result($result,0,'count');
+	if($count < 1 || ($module =='Calendar' && $activity_mode=='task'))
+	{
+		$retval='false';	
+	}	
+	return $retval;	
+			
+	
+}	
+
 /** This function returns the detailed block information of a record in a module.
 * Param $module - module name
 * Param $block - block id





More information about the vtigercrm-commits mailing list