[Vtigercrm-commits] [vtiger-commits] r9345 - /vtigercrm/trunk/include/utils/CommonUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Sep 7 05:30:49 EDT 2006
Author: richie
Date: Thu Sep 7 03:30:14 2006
New Revision: 9345
Log:
Writing the actionid and actionname array in tabdata.php file
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 Thu Sep 7 03:30:14 2006
@@ -1593,6 +1593,34 @@
}
+ //Constructing the actionname=>actionid array
+ $actionid_array=Array();
+ $sql1="select * from vtiger_actionmapping";
+ $result1=$adb->query($sql1);
+ $num_seq1=$adb->num_rows($result1);
+ for($i=0;$i<$num_seq1;$i++)
+ {
+ $actionname=$adb->query_result($result1,$i,'actionname');
+ $actionid=$adb->query_result($result1,$i,'actionid');
+ $actionid_array[$actionname]=$actionid;
+ }
+
+ print_r($actionid_array);
+
+ //Constructing the actionid=>actionname array with securitycheck=0
+ $actionname_array=Array();
+ $sql2="select * from vtiger_actionmapping where securitycheck=0";
+ $result2=$adb->query($sql2);
+ $num_seq2=$adb->num_rows($result2);
+ for($i=0;$i<$num_seq2;$i++)
+ {
+ $actionname=$adb->query_result($result2,$i,'actionname');
+ $actionid=$adb->query_result($result2,$i,'actionid');
+ $actionname_array[$actionid]=$actionname;
+ }
+
+ print_r($actionname_array);
+
$filename = 'tabdata.php';
@@ -1614,6 +1642,10 @@
$newbuf .= "\$tab_info_array=".constructArray($result_array).";\n";
$newbuf .= "\n";
$newbuf .= "\$tab_seq_array=".constructArray($seq_array).";\n";
+ $newbuf .= "\n";
+ $newbuf .= "\$action_id_array=".constructSingleStringKeyAndValueArray($actionid_array).";\n";
+ $newbuf .= "\n";
+ $newbuf .= "\$action_name_array=".constructSingleStringValueArray($actionname_array).";\n";
$newbuf .= "?>";
fputs($handle, $newbuf);
fclose($handle);
More information about the vtigercrm-commits
mailing list