[Vtigercrm-commits] [vtiger-commits] r7664 - in /vtigercrm/trunk/include/utils: CommonUtils.php DetailViewUtils.php UserInfoUtil.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Jun 29 08:32:38 EDT 2006
Author: richie
Date: Thu Jun 29 06:32:03 2006
New Revision: 7664
Log:
Changes made as the New UI for Users has been integrated
Modified:
vtigercrm/trunk/include/utils/CommonUtils.php
vtigercrm/trunk/include/utils/DetailViewUtils.php
vtigercrm/trunk/include/utils/UserInfoUtil.php
Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Thu Jun 29 06:32:03 2006
@@ -952,12 +952,12 @@
{
if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0 || $module == "Users")
{
- $sql = "select vtiger_field.* from vtiger_field where vtiger_field.tabid=".$tabid." and vtiger_field.block in $blockid_list and vtiger_field.displaytype in (1,2) order by block,sequence";
+ $sql = "select vtiger_field.* from vtiger_field where vtiger_field.tabid=".$tabid." and vtiger_field.block in $blockid_list and vtiger_field.displaytype in (1,2,4) order by block,sequence";
}
else
{
$profileList = getCurrentUserProfileList();
- $sql = "select vtiger_field.* from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid=".$tabid." and vtiger_field.block in ".$blockid_list." and vtiger_field.displaytype in (1,2) and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_profile2field.profileid in ".$profileList." group by vtiger_field.fieldid order by block,sequence";
+ $sql = "select vtiger_field.* from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid=".$tabid." and vtiger_field.block in ".$blockid_list." and vtiger_field.displaytype in (1,2,4) and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_profile2field.profileid in ".$profileList." group by vtiger_field.fieldid order by block,sequence";
}
$result = $adb->query($sql);
$getBlockInfo=getDetailBlockInformation($module,$result,$col_fields,$tabid,$block_label);
@@ -973,7 +973,7 @@
else
{
$profileList = getCurrentUserProfileList();
- $sql = "select vtiger_field.* from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid=".$tabid." and vtiger_field.block in ".$blockid_list." and vtiger_field.displaytype in (1,4) and info_type = '".$info_type."' and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_profile2field.profileid in ".$profileList.=" group by vtiger_field.fieldid order by block,sequence";
+ $sql = "select vtiger_field.* from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid=".$tabid." and vtiger_field.block in ".$blockid_list." and ".$display_type_check." and info_type = '".$info_type."' and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_profile2field.profileid in ".$profileList.=" group by vtiger_field.fieldid order by block,sequence";
}
}
else
@@ -985,7 +985,7 @@
else
{
$profileList = getCurrentUserProfileList();
- $sql = "select vtiger_field.* from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid=".$tabid." and vtiger_field.block in ".$blockid_list." and vtiger_field.displaytype in (1,4) and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_profile2field.profileid in ".$profileList.=" group by vtiger_field.fieldid order by block,sequence";
+ $sql = "select vtiger_field.* from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid=".$tabid." and vtiger_field.block in ".$blockid_list." and ".$display_type_check." and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_profile2field.profileid in ".$profileList.=" group by vtiger_field.fieldid order by block,sequence";
}
}
$result = $adb->query($sql);
Modified: vtigercrm/trunk/include/utils/DetailViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/DetailViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/DetailViewUtils.php Thu Jun 29 06:32:03 2006
@@ -58,7 +58,13 @@
if($col_fields[$fieldname]=='--None--')
$col_fields[$fieldname]='';
- if($uitype == 116)
+ if($uitype == 99)
+ {
+ $label_fld[] = $mod_strings[$fieldlabel];
+ $label_fld[] = $col_fields[$fieldname];
+ if($fieldname == 'confirm_password')
+ return null;
+ }elseif($uitype == 116)
{
$label_fld[] = $mod_strings[$fieldlabel];
$label_fld[] = getCurrencyName($col_fields[$fieldname]);
@@ -1084,7 +1090,10 @@
$generatedtype = $adb->query_result($result,$i,"generatedtype");
$tabid = $adb->query_result($result,$i,"tabid");
$custfld = getDetailViewOutputHtml($uitype, $fieldname, $fieldlabel, $col_fields,$generatedtype,$tabid);
- $label_data[$block][] = array($custfld[0]=>array("value"=>$custfld[1],"ui"=>$custfld[2],"options"=>$custfld["options"],"secid"=>$custfld["secid"],"link"=>$custfld["link"],"cursymb"=>$custfld["cursymb"],"salut"=>$custfld["salut"],"cntimage"=>$custfld["cntimage"],"isadmin"=>$custfld["isadmin"],"tablename"=>$fieldtablename,"fldname"=>$fieldname));
+ if(is_array($custfld))
+ {
+ $label_data[$block][] = array($custfld[0]=>array("value"=>$custfld[1],"ui"=>$custfld[2],"options"=>$custfld["options"],"secid"=>$custfld["secid"],"link"=>$custfld["link"],"cursymb"=>$custfld["cursymb"],"salut"=>$custfld["salut"],"cntimage"=>$custfld["cntimage"],"isadmin"=>$custfld["isadmin"],"tablename"=>$fieldtablename,"fldname"=>$fieldname));
+ }
$i++;
if($i<$noofrows)
{
@@ -1099,7 +1108,10 @@
$tabid = $adb->query_result($result,$i,"tabid");
$custfld = getDetailViewOutputHtml($uitype, $fieldname, $fieldlabel, $col_fields,$generatedtype,$tabid);
- $label_data[$block][] = array($custfld[0]=>array("value"=>$custfld[1],"ui"=>$custfld[2],"options"=>$custfld["options"],"secid"=>$custfld["secid"],"link"=>$custfld["link"],"cursymb"=>$custfld["cursymb"],"salut"=>$custfld["salut"],"cntimage"=>$custfld["cntimage"],"isadmin"=>$custfld["isadmin"],"tablename"=>$fieldtablename,"fldname"=>$fieldname));
+ if(is_array($custfld))
+ {
+ $label_data[$block][] = array($custfld[0]=>array("value"=>$custfld[1],"ui"=>$custfld[2],"options"=>$custfld["options"],"secid"=>$custfld["secid"],"link"=>$custfld["link"],"cursymb"=>$custfld["cursymb"],"salut"=>$custfld["salut"],"cntimage"=>$custfld["cntimage"],"isadmin"=>$custfld["isadmin"],"tablename"=>$fieldtablename,"fldname"=>$fieldname));
+ }
}
}
Modified: vtigercrm/trunk/include/utils/UserInfoUtil.php
==============================================================================
--- vtigercrm/trunk/include/utils/UserInfoUtil.php (original)
+++ vtigercrm/trunk/include/utils/UserInfoUtil.php Thu Jun 29 06:32:03 2006
@@ -2763,6 +2763,30 @@
}
+/** Function to get groupid and groupname of all for the given groupid
+ * @returns $grpArray -- Group Array in the following format:
+ * $grpArray=Array($grpid1=>$grpname);
+ */
+function getGroupDetails($id)
+{
+ global $log;
+ $log->debug("Entering getAllGroupDetails() method ...");
+ global $adb;
+ $query="select * from vtiger_groups where groupid = $id";
+ $result = $adb->query($query);
+ $num_rows=$adb->num_rows($result);
+ if($num_rows < 1)
+ return null;
+ $group_details=Array();
+ $grpid=$adb->query_result($result,0,'groupid');
+ $grpname=$adb->query_result($result,0,'groupname');
+ $grpdesc=$adb->query_result($result,0,'description');
+ $group_details=Array($grpid,$grpname,$grpdesc);
+
+ $log->debug("Exiting getAllGroupDetails method ...");
+ return $group_details;
+
+}
/** Function to get group information of all vtiger_groups
* @returns $grpInfoArray -- Group Informaton array in the following format:
* $grpInfoArray=Array($grpid1=>Array($grpname,description) $grpid2=>Array($grpname,description),............,$grpidn=>Array($grpname,description));
More information about the vtigercrm-commits
mailing list