[Vtigercrm-commits] [vtiger-commits] r5288 - /vtigercrm/trunk/include/utils/CommonUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Apr 24 11:23:34 EDT 2006


Author: saraj
Date: Mon Apr 24 09:23:29 2006
New Revision: 5288

Log:
Added new function getQuickCreateModules for getting all module with quick create feature in the Header combo - Ahmed

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

Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Mon Apr 24 09:23:29 2006
@@ -1495,6 +1495,31 @@
 }
 
 /**
+ * This function is used to get the all the modules that have Quick Create Feature.
+ * Returns Tab Name and Tablabel.
+ */
+
+function getQuickCreateModules()
+{
+         global $adb;
+         global $mod_strings;
+
+$qc_query = "select distinct tablabel,tab.name from field inner join tab on tab.tabid = field.tabid where quickcreate=0 order by tab.tablabel";
+$result = $adb->query($qc_query);
+$noofrows = $adb->num_rows($result);
+$qcmodule_array = Array();
+for($i = 0; $i < $noofrows; $i++)
+{
+         $tablabel = $adb->query_result($result,$i,'tablabel');
+         $tabname = $adb->query_result($result,$i,'name');
+         $return_qcmodule[] = $tablabel;
+         $return_qcmodule[] = $tabname;
+}
+        $return_qcmodule = array_chunk($return_qcmodule,2);
+        return $return_qcmodule;
+}
+																					   
+/**
  * This function is used to get the Quick create form field parameters for a given module.
  * Param $module - module name 
  * returns the value in array format





More information about the vtigercrm-commits mailing list