[Vtigercrm-commits] [vtiger-commits] r10559 - in /vtigercrm/branches/5.0.3: include/utils/ modules/CustomView/ modules/Reports/ modules/Settings/
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Apr 4 11:21:23 EDT 2007
Author: saraj
Date: Wed Apr 4 09:21:12 2007
New Revision: 10559
Log:
made to show fields of display type 3
Modified:
vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
vtigercrm/branches/5.0.3/include/utils/utils.php
vtigercrm/branches/5.0.3/modules/CustomView/CustomView.php
vtigercrm/branches/5.0.3/modules/Reports/Reports.php
vtigercrm/branches/5.0.3/modules/Settings/EditDefOrgFieldLevelAccess.php
vtigercrm/branches/5.0.3/modules/Settings/UpdateDefaultFieldLevelAccess.php
Modified: vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php Wed Apr 4 09:21:12 2007
@@ -491,8 +491,12 @@
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."
+ ON vtiger_def_org_field.fieldid = vtiger_field.fieldid";
+ if($module == "Calendar")
+ $query .=" WHERE vtiger_field.tabid in (9,16)";
+ else
+ $query .=" WHERE vtiger_field.tabid =".$tabid;
+ $query .=" AND vtiger_profile2field.visible = 0
AND vtiger_profile2field.visible = 0
AND vtiger_def_org_field.visible = 0
AND vtiger_profile2field.profileid IN ".$profileList."
@@ -508,9 +512,12 @@
$ui_col_array=Array();
$query = "SELECT uitype, columnname, fieldname
- FROM vtiger_field
- WHERE tabid = ".$tabid."
- AND fieldname IN".$field_list;
+ FROM vtiger_field";
+ if($module == "Calendar")
+ $query .=" WHERE vtiger_field.tabid in (9,16)";
+ else
+ $query .=" WHERE vtiger_field.tabid =".$tabid;
+ $query .=" AND fieldname IN".$field_list;
$result = $adb->query($query);
$num_rows=$adb->num_rows($result);
for($i=0;$i<$num_rows;$i++)
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 Wed Apr 4 09:21:12 2007
@@ -1212,7 +1212,7 @@
global $adb;
$adb->database->SetFetchMode(ADODB_FETCH_ASSOC);
- $fld_result = $adb->query("select * from vtiger_field where generatedtype=1 and displaytype in (1,2) and tabid != 29");
+ $fld_result = $adb->query("select * from vtiger_field where generatedtype=1 and displaytype in (1,2,3) and tabid != 29");
$num_rows = $adb->num_rows($fld_result);
for($i=0; $i<$num_rows; $i++)
{
@@ -1232,7 +1232,7 @@
$log->debug("Entering insert_def_org_field() method ...");
global $adb;
$adb->database->SetFetchMode(ADODB_FETCH_ASSOC);
- $fld_result = $adb->query("select * from vtiger_field where generatedtype=1 and displaytype in (1,2) and tabid != 29");
+ $fld_result = $adb->query("select * from vtiger_field where generatedtype=1 and displaytype in (1,2,3) and tabid != 29");
$num_rows = $adb->num_rows($fld_result);
for($i=0; $i<$num_rows; $i++)
{
Modified: vtigercrm/branches/5.0.3/modules/CustomView/CustomView.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/CustomView/CustomView.php (original)
+++ vtigercrm/branches/5.0.3/modules/CustomView/CustomView.php Wed Apr 4 09:21:12 2007
@@ -188,13 +188,8 @@
$tabid ="9,16";
global $current_user;
require('user_privileges/user_privileges_'.$current_user->id.'.php');
- if($tabid == 4 || $tabid ==7)
- {
+
$display_type = " vtiger_field.displaytype in (1,2,3)";
- }else
- {
- $display_type = " vtiger_field.displaytype in (1,2)";
- }
if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0)
{
Modified: vtigercrm/branches/5.0.3/modules/Reports/Reports.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Reports/Reports.php (original)
+++ vtigercrm/branches/5.0.3/modules/Reports/Reports.php Wed Apr 4 09:21:12 2007
@@ -312,13 +312,13 @@
//Security Check
if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] ==0)
{
- $sql = "select * from vtiger_field where vtiger_field.tabid=".$tabid." and vtiger_field.block in (".$block .") and vtiger_field.displaytype in (1,2) order by sequence";
+ $sql = "select * from vtiger_field where vtiger_field.tabid=".$tabid." and vtiger_field.block in (".$block .") and vtiger_field.displaytype in (1,2,3) order by sequence";
}
else
{
$profileList = getCurrentUserProfileList();
- $sql = "select * 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 (".$block .") 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 sequence";
+ $sql = "select * 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 (".$block .") and vtiger_field.displaytype in (1,2,3) 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 sequence";
}
//Added to include vtiger_activity type for Reports Module
if($module == 'Calendar' && $block == 19)
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 Wed Apr 4 09:21:12 2007
@@ -56,6 +56,7 @@
for($i=0; $i<$noofrows; $i++,$row++)
{
$uitype = $adb->query_result($fieldListResult,$i,"uitype");
+ $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)
@@ -69,9 +70,14 @@
$standCustFld []= $mandatory.' '.$lang_strings[$fieldlabel];
else
$standCustFld []= $mandatory.' '.$fieldlabel;
- if($adb->query_result($fieldListResult,$i,"visible") == 0)
+ if($adb->query_result($fieldListResult,$i,"visible") == 0 && $displaytype!=3)
{
$visible = "checked";
+ }
+ elseif($displaytype==3)
+ {
+ $visible = "checked";
+ $readonly = 'disabled';
}
else
{
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 Wed Apr 4 09:21:12 2007
@@ -26,6 +26,7 @@
for($i=0; $i<$noofrows; $i++)
{
$fieldid = $adb->query_result($fieldListResult,$i,"fieldid");
+ $displaytype = $adb->query_result($fieldListResult,$i,"displaytype");
$visible = $_REQUEST[$fieldid];
if($visible == 'on')
{
@@ -37,7 +38,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)
+ if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3)
{
$visible_value = 0;
}
More information about the vtigercrm-commits
mailing list