[Vtigercrm-commits] [vtiger-commits] r10839 - in /vtigercrm/branches/5.0.3: include/utils/ modules/Settings/ modules/Users/

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu May 10 16:18:04 EDT 2007


Author: jerrydgeorge
Date: Thu May 10 14:17:36 2007
New Revision: 10839

Log:
accessing the fields issue has been fixed.fixes #3819

Modified:
    vtigercrm/branches/5.0.3/include/utils/utils.php
    vtigercrm/branches/5.0.3/modules/Settings/EditDefOrgFieldLevelAccess.php
    vtigercrm/branches/5.0.3/modules/Settings/UpdateDefaultFieldLevelAccess.php
    vtigercrm/branches/5.0.3/modules/Settings/profilePrivileges.php
    vtigercrm/branches/5.0.3/modules/Users/SaveProfile.php
    vtigercrm/branches/5.0.3/modules/Users/UpdateProfileChanges.php

Modified: vtigercrm/branches/5.0.3/include/utils/utils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/utils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/utils.php Thu May 10 14:17:36 2007
@@ -1286,7 +1286,7 @@
 	$return_data=array();
     for($i=0; $i<$adb->num_rows($result); $i++)
     {
-		$return_data[]=array($adb->query_result($result,$i,"fieldlabel"),$adb->query_result($result,$i,"visible"),$adb->query_result($result,$i,"uitype"),$adb->query_result($result,$i,"visible"),$adb->query_result($result,$i,"fieldid"));
+		$return_data[]=array($adb->query_result($result,$i,"fieldlabel"),$adb->query_result($result,$i,"visible"),$adb->query_result($result,$i,"uitype"),$adb->query_result($result,$i,"visible"),$adb->query_result($result,$i,"fieldid"),$adb->query_result($result,$i,"displaytype"));
 	}	
 	$log->debug("Exiting getProfile2FieldPermissionList method ...");
 	return $return_data;

Modified: vtigercrm/branches/5.0.3/modules/Settings/EditDefOrgFieldLevelAccess.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Settings/EditDefOrgFieldLevelAccess.php (original)
+++ vtigercrm/branches/5.0.3/modules/Settings/EditDefOrgFieldLevelAccess.php Thu May 10 14:17:36 2007
@@ -27,7 +27,7 @@
 require_once($theme_path.'layout_utils.php');
 
 
-$field_module = Array('Leads','Accounts','Contacts','Potentials','HelpDesk','Products','Notes','Emails','Calendar','Events','Vendors','PriceBooks','Quotes','PurchaseOrder','SalesOrder','Invoice','Campaigns','Faq');
+$field_module=getFieldModuleAccessArray();
 $allfields=Array();
 foreach($field_module as $fld_module)
 {
@@ -59,7 +59,7 @@
 		$displaytype = $adb->query_result($fieldListResult,$i,"displaytype");
                 $mandatory = '';
 		$readonly = '';
-                if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 20 || $uitype == 53)
+                if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 20 || $uitype == 53 || $displaytype == 3)
                 {
                         $mandatory = '<font color="red">*</font>';
 						$readonly = 'disabled';

Modified: vtigercrm/branches/5.0.3/modules/Settings/UpdateDefaultFieldLevelAccess.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Settings/UpdateDefaultFieldLevelAccess.php (original)
+++ vtigercrm/branches/5.0.3/modules/Settings/UpdateDefaultFieldLevelAccess.php Thu May 10 14:17:36 2007
@@ -14,7 +14,6 @@
 require_once('include/utils/utils.php');
 global $adb;
 
-//$field_module = Array('Leads','Accounts','Contacts','Potentials','HelpDesk','Products','Notes','Emails','Calendar','Events','Vendors','PriceBooks','Quotes','PurchaseOrder','SalesOrder','Invoice','Campaigns','Faq');
 
 $field_module=getFieldModuleAccessArray();
 
@@ -38,7 +37,7 @@
 		}
 		//Updating the Mandatory vtiger_fields
 		$uitype = $adb->query_result($fieldListResult,$i,"uitype");
-		if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3)
+		if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20)
 		{
 			$visible_value = 0; 
 		}		

Modified: vtigercrm/branches/5.0.3/modules/Settings/profilePrivileges.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Settings/profilePrivileges.php (original)
+++ vtigercrm/branches/5.0.3/modules/Settings/profilePrivileges.php Thu May 10 14:17:36 2007
@@ -420,7 +420,6 @@
 {
 	$FieldId = $adb->query_result($result,$i,'fieldid');
 	$Visible = $adb->query_result($result,$i,'visible');
-
 	$disable_field_array[$FieldId] = $Visible;
 }
 
@@ -472,15 +471,12 @@
 		{
 			$fldLabel= $fieldListResult[$module_name][$j][0];
 			$uitype = $fieldListResult[$module_name][$j][2];
+			$displaytype = $fieldListResult[$module_name][$j][5];
 			$mandatory = '';
 			$readonly = '';
 			$field=array();
-			if($disable_field_array[$fieldListResult[$module_name][$j][4]] == 1)
-			{
-				$mandatory = '<font color="blue">*</font>';
-				$readonly = 'disabled';
-			}
-			if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53)
+			
+			if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20)
 			{
 				$mandatory = '<font color="red">*</font>';
 				$readonly = 'disabled';
@@ -493,6 +489,13 @@
 			{
 				$visible = "";
 			}
+			if($disable_field_array[$fieldListResult[$module_name][$j][4]] == 1)
+			{
+				$mandatory = '<font color="blue">*</font>';
+				$readonly = 'disabled';
+				$visible = "";
+			}
+			
 			if($language_strings[$fldLabel] != '')
 				$field[]=$mandatory.' '.$language_strings[$fldLabel];
 			else
@@ -520,16 +523,13 @@
 			{
 				$fldLabel= $fieldListResult[$module_name][$j][0];
 				$uitype = $fieldListResult[$module_name][$j][2];
+				$displaytype = $fieldListResult[$module_name][$j][5];
 				$mandatory = '';
 				$readonly = '';
 				$field=array();
 
-				if($disable_field_array[$fieldListResult[$module_name][$j][4]] == 1)
-				{
-					$mandatory = '<font color="blue">*</font>';
-					$readonly = 'disabled';
-				}
-				if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53)
+				
+				if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20)
 				{
 					$mandatory = '<font color="red">*</font>';
 					$readonly = 'disabled';
@@ -542,6 +542,13 @@
 				{
 					$visible = "";
 				}
+				if($disable_field_array[$fieldListResult[$module_name][$j][4]] == 1)
+				{
+					$mandatory = '<font color="blue">*</font>';
+					$readonly = 'disabled';
+					$visible = "";
+				}
+				
 				if($language_strings[$fldLabel] != '')
 					$field[]=$mandatory.' '.$language_strings[$fldLabel];
 				else
@@ -566,21 +573,27 @@
 			{
 				$fldLabel= $fieldListResult[$module_name][$j][0];
 				$uitype = $fieldListResult[$module_name][$j][2];
+				$displaytype = $fieldListResult[$module_name][$j][5];
 				$mandatory = '';
 				$readonly = '';
 				$field=array();
 
+				
+				if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20)
+				{
+					$mandatory = '<font color="red">*</font>';
+					$readonly = 'disabled';
+				}	
+				
 				if($disable_field_array[$fieldListResult[$module_name][$j][4]] == 1)
 				{
 					$mandatory = '<font color="blue">*</font>';
 					$readonly = 'disabled';
+					$visible = "";
+				}else
+				{
+					$visible = "checked";
 				}
-				if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53)
-				{
-					$mandatory = '<font color="red">*</font>';
-					$readonly = 'disabled';
-				}	
-				$visible = "checked";
 				if($language_strings[$fldLabel] != '')
 					$field[]=$mandatory.' '.$language_strings[$fldLabel];
 				else

Modified: vtigercrm/branches/5.0.3/modules/Users/SaveProfile.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Users/SaveProfile.php (original)
+++ vtigercrm/branches/5.0.3/modules/Users/SaveProfile.php Thu May 10 14:17:36 2007
@@ -178,7 +178,8 @@
 		}
 		//Updating the Mandatory vtiger_fields
 		$uitype = $adb->query_result($fieldListResult,$i,"uitype");
-		if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53)
+		$displaytype =  $adb->query_result($fieldListResult,$i,"displaytype");
+		if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20)
 		{
 			$visible_value = 0;
 		}

Modified: vtigercrm/branches/5.0.3/modules/Users/UpdateProfileChanges.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Users/UpdateProfileChanges.php (original)
+++ vtigercrm/branches/5.0.3/modules/Users/UpdateProfileChanges.php Thu May 10 14:17:36 2007
@@ -162,7 +162,8 @@
 		}
 		//Updating the Mandatory vtiger_fields
 		$uitype = $adb->query_result($fieldListResult,$i,"uitype");
-		if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53)
+		$displaytype =  $adb->query_result($fieldListResult,$i,"displaytype");
+		if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20)
 		{
 			$visible_value = 0;
 		}





More information about the vtigercrm-commits mailing list