[Vtigercrm-commits] [vtiger-commits] r4395 - /vtigercrm/branches/4.2/data/CRMEntity.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Mar 22 21:59:42 EST 2006
Author: mfedyk
Date: Wed Mar 22 19:59:39 2006
New Revision: 4395
Log:
Fix restricted user modifying record erases hidden fields, by mcrowe. closes #63
Modified:
vtigercrm/branches/4.2/data/CRMEntity.php
Modified: vtigercrm/branches/4.2/data/CRMEntity.php
==============================================================================
--- vtigercrm/branches/4.2/data/CRMEntity.php (original)
+++ vtigercrm/branches/4.2/data/CRMEntity.php Wed Mar 22 19:59:39 2006
@@ -439,7 +439,18 @@
}
$tabid= getTabid($module);
- $sql = "select * from field where tabid=".$tabid." and tablename='".$table_name."' and displaytype in (1,3)";
+ // MWC -- Fix hidden field saving issue
+ // $sql = "select * from field where tabid=" . $tabid . " and tablename='" . $table_name . "' and displaytype in (1,3)";
+ $sql = "select * from field
+ inner join profile2field on profile2field.fieldid=field.fieldid
+ inner join def_org_field on def_org_field.fieldid=field.fieldid
+ where field.tabid=" . $tabid . "
+ and field.tablename='" . $table_name . "'
+ and field.displaytype in (1,3)
+ and profile2field.visible=0
+ and def_org_field.visible=0
+ and profile2field.profileid=" . $profile_id . "
+ order by sequence";
$result = $adb->query($sql);
$noofrows = $adb->num_rows($result);
for($i=0; $i<$noofrows; $i++)
@@ -918,7 +929,16 @@
}
$tabid = getTabid($module);
- $sql1 = "select * from field where tabid=".$tabid;
+ // MWC -- Fix hidden field saving issue
+ // $sql1 = "select * from field where tabid=" . $tabid;
+ $sql1 = "select * from field
+ inner join profile2field on profile2field.fieldid=field.fieldid
+ inner join def_org_field on def_org_field.fieldid=field.fieldid
+ where field.tabid=" . $tabid . "
+ and profile2field.visible=0
+ and def_org_field.visible=0
+ and profile2field.profileid=" . $profile_id . "
+ order by sequence";
$result1 = $adb->query($sql1);
$noofrows = $adb->num_rows($result1);
for($i=0; $i<$noofrows; $i++)
More information about the vtigercrm-commits
mailing list