[Vtigercrm-commits] [vtiger-commits] r10633 - /vtigercrm/branches/5.0.3/modules/Accounts/ListViewTop.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Apr 11 05:44:47 EDT 2007


Author: saraj
Date: Wed Apr 11 03:44:38 2007
New Revision: 10633

Log:
fix for Improper display in My Top Accounts. Fixes #3430 --minnie

Modified:
    vtigercrm/branches/5.0.3/modules/Accounts/ListViewTop.php

Modified: vtigercrm/branches/5.0.3/modules/Accounts/ListViewTop.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Accounts/ListViewTop.php (original)
+++ vtigercrm/branches/5.0.3/modules/Accounts/ListViewTop.php Wed Apr 11 03:44:38 2007
@@ -37,7 +37,17 @@
 	global $current_user;
 	$current_module_strings = return_module_language($current_language, "Accounts");
 
+        require('user_privileges/user_privileges_'.$current_user->id.'.php');
+        require('user_privileges/sharing_privileges_'.$current_user->id.'.php');
+
 	$list_query = "select vtiger_account.accountid, vtiger_account.accountname, vtiger_account.tickersymbol, sum(vtiger_potential.amount) as amount from vtiger_potential inner join vtiger_crmentity on (vtiger_potential.potentialid=vtiger_crmentity.crmid) inner join vtiger_account on (vtiger_potential.accountid=vtiger_account.accountid) where vtiger_crmentity.deleted=0 AND vtiger_crmentity.smownerid='".$current_user->id."' and vtiger_potential.sales_stage not in ('Closed Won', 'Closed Lost','".$app_strings['LBL_CLOSE_WON']."','".$app_strings['LBL_CLOSE_LOST']."') group by vtiger_account.accountid, vtiger_account.accountname, vtiger_account.tickersymbol order by amount desc;";
+	if($is_admin==false && $profileGlobalPermission[1] == 1 && $profileGlobalPermission[2] == 1 && $defaultOrgSharingPermission[6] == 3)
+	{
+		$sec_parameter=getListViewSecurityParameter('Accounts');
+		$list_query .= $sec_parameter;
+
+	}
+
 	$list_result=$adb->query($list_query);
 	$open_accounts_list = array();
 	$noofrows = min($adb->num_rows($list_result),5);





More information about the vtigercrm-commits mailing list