[Vtigercrm-commits] [vtiger-commits] r4795 - /vtigercrm/trunk/modules/Users/CreateUserPrivilegeFile.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Mar 30 14:13:38 EST 2006
Author: don
Date: Thu Mar 30 12:13:34 2006
New Revision: 4795
Log:
Added function constructSingleStringValueArray()
Modified:
vtigercrm/trunk/modules/Users/CreateUserPrivilegeFile.php
Modified: vtigercrm/trunk/modules/Users/CreateUserPrivilegeFile.php
==============================================================================
--- vtigercrm/trunk/modules/Users/CreateUserPrivilegeFile.php (original)
+++ vtigercrm/trunk/modules/Users/CreateUserPrivilegeFile.php Thu Mar 30 12:13:34 2006
@@ -1081,6 +1081,32 @@
}
}
+function constructSingleStringValueArray($var)
+{
+
+ $size = sizeof($var);
+ $i=1;
+ if (is_array($var))
+ {
+ $code = 'array(';
+ foreach ($var as $key => $value)
+ {
+ if($i<$size)
+ {
+ $code .= $key."=>'".$value."',";
+ }
+ else
+ {
+ $code .= $key."=>'".$value."'";
+ }
+ $i++;
+ }
+ $code .= ')';
+ return $code;
+ }
+}
+
+
function constructSingleArray($var)
{
if (is_array($var))
More information about the vtigercrm-commits
mailing list