[Vtigercrm-commits] [vtiger-commits] r7457 - /vtigercrm/trunk/modules/Reports/Reports.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Fri Jun 23 05:39:13 EDT 2006


Author: saraj
Date: Fri Jun 23 03:39:09 2006
New Revision: 7457

Log:
Added Profile check in query

Modified:
    vtigercrm/trunk/modules/Reports/Reports.php

Modified: vtigercrm/trunk/modules/Reports/Reports.php
==============================================================================
--- vtigercrm/trunk/modules/Reports/Reports.php (original)
+++ vtigercrm/trunk/modules/Reports/Reports.php Fri Jun 23 03:39:09 2006
@@ -23,7 +23,7 @@
 global $related_modules;
 global $profileList;
 
-//$profileList = getCurrentUserProfileList();
+$profileList = getCurrentUserProfileList();
 $adv_filter_options = array("e"=>"equals",
 		            "n"=>"not equal to",
 			    "s"=>"starts with",
@@ -316,7 +316,7 @@
 		}
 		else
 		{
-
+			
 			$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.uitype != 50 and 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";
 		}
 		$result = $adb->query($sql);
@@ -458,6 +458,7 @@
 		global $adb;
 		global $log;
 		global $current_user;
+		global $profileList;
 		require('user_privileges/user_privileges_'.$current_user->id.'.php');		
 
 		$tabid = getTabid($module);
@@ -473,7 +474,6 @@
 		}
 		else
 		{
-			$profileList = getCurrentUserProfileList();			
 			$sql = "select * from vtiger_field inner join vtiger_tab on vtiger_tab.tabid = vtiger_field.tabid 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.uitype =5 or vtiger_field.displaytype=2) and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_field.block in (".$blockids.") and vtiger_profile2field.profileid in ".$profileList." order by vtiger_field.sequence";
 
 		}
@@ -925,6 +925,7 @@
 		global $adb;
 		global $log;
 		global $current_user;
+		global $profileList;
 		require('user_privileges/user_privileges_'.$current_user->id.'.php');
 		$tabid = getTabid($module);
 		$escapedchars = Array('_SUM','_AVG','_MIN','_MAX');
@@ -934,7 +935,6 @@
 		}
 		else
 		{
-			$profileList = getCurrentUserProfileList();
 			$ssql = "select * from vtiger_field inner join vtiger_tab on vtiger_tab.tabid = vtiger_field.tabid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid  where vtiger_field.uitype != 50 and vtiger_field.tabid=".$tabid." and vtiger_field.displaytype = 1 and vtiger_def_org_field.visible=0 and vtiger_profile2field.visible=0 and vtiger_profile2field.profileid in ".$profileList." order by sequence";
 		}
 		$result = $adb->query($ssql);





More information about the vtigercrm-commits mailing list