[Vtigercrm-commits] [vtiger-commits] r4761 - in /vtigercrm/trunk/modules/Users: SaveProfile.php UpdateProfileChanges.php profilePrivileges.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Mar 30 07:30:11 EST 2006


Author: don
Date: Thu Mar 30 05:30:05 2006
New Revision: 4761

Log:
Duplicate code removal done

Modified:
    vtigercrm/trunk/modules/Users/SaveProfile.php
    vtigercrm/trunk/modules/Users/UpdateProfileChanges.php
    vtigercrm/trunk/modules/Users/profilePrivileges.php

Modified: vtigercrm/trunk/modules/Users/SaveProfile.php
==============================================================================
Binary files - no diff available.

Modified: vtigercrm/trunk/modules/Users/UpdateProfileChanges.php
==============================================================================
--- vtigercrm/trunk/modules/Users/UpdateProfileChanges.php (original)
+++ vtigercrm/trunk/modules/Users/UpdateProfileChanges.php Thu Mar 30 05:30:05 2006
@@ -98,8 +98,6 @@
 				$permission_value = 1;
 			}
 			$update_query = "update profile2standardpermissions set permissions=".$permission_value." where tabid=".$tab_id." and Operation=".$action_id." and profileid=".$profileid;
-			//echo $update_query;
-			//echo '<BR>';
 			$adb->query($update_query);
 			if($tab_id ==9)
 			{
@@ -141,23 +139,7 @@
 
 
 
-	$modArr= Array('Leads'=>'LBL_LEAD_FIELD_ACCESS',
-                'Accounts'=>'LBL_ACCOUNT_FIELD_ACCESS',
-                'Contacts'=>'LBL_CONTACT_FIELD_ACCESS',
-                'Potentials'=>'LBL_OPPORTUNITY_FIELD_ACCESS',
-                'HelpDesk'=>'LBL_HELPDESK_FIELD_ACCESS',
-                'Products'=>'LBL_PRODUCT_FIELD_ACCESS',
-                'Notes'=>'LBL_NOTE_FIELD_ACCESS',
-                'Emails'=>'LBL_EMAIL_FIELD_ACCESS',
-                'Activities'=>'LBL_TASK_FIELD_ACCESS',
-                'Events'=>'LBL_EVENT_FIELD_ACCESS',
-                'Vendors'=>'LBL_VENDOR_FIELD_ACCESS',
-                'PriceBooks'=>'LBL_PB_FIELD_ACCESS',
-                'Quotes'=>'LBL_QUOTE_FIELD_ACCESS',
-                'PurchaseOrder'=>'LBL_PO_FIELD_ACCESS',
-                'SalesOrder'=>'LBL_SO_FIELD_ACCESS',
-                'Invoice'=>'LBL_INVOICE_FIELD_ACCESS'
-              );
+	$modArr=getFieldModuleAccessArray(); 
 
 foreach($modArr as $fld_module => $fld_label)
 {

Modified: vtigercrm/trunk/modules/Users/profilePrivileges.php
==============================================================================
--- vtigercrm/trunk/modules/Users/profilePrivileges.php (original)
+++ vtigercrm/trunk/modules/Users/profilePrivileges.php Thu Mar 30 05:30:05 2006
@@ -197,7 +197,6 @@
 			$stand[]=$tab_view_per;
 			$privileges_stand[]=$stand;
 		}
-		$act_perr_arry = getTabsActionPermission($parentProfileId);
 	}
 
 }
@@ -366,23 +365,9 @@
 $smarty->assign("UTILITIES_PRIV",$privilege_util);		
 
 //Field privileges		
-$modArr= Array('Leads'=>'LBL_LEAD_FIELD_ACCESS',
-		'Accounts'=>'LBL_ACCOUNT_FIELD_ACCESS',
-		'Contacts'=>'LBL_CONTACT_FIELD_ACCESS',
-		'Potentials'=>'LBL_OPPORTUNITY_FIELD_ACCESS',
-		'HelpDesk'=>'LBL_HELPDESK_FIELD_ACCESS',
-		'Products'=>'LBL_PRODUCT_FIELD_ACCESS',
-		'Notes'=>'LBL_NOTE_FIELD_ACCESS',
-		'Emails'=>'LBL_EMAIL_FIELD_ACCESS',
-		'Activities'=>'LBL_TASK_FIELD_ACCESS',
-		'Events'=>'LBL_EVENT_FIELD_ACCESS',
-		'Vendors'=>'LBL_VENDOR_FIELD_ACCESS',
-		'PriceBooks'=>'LBL_PB_FIELD_ACCESS',
-		'Quotes'=>'LBL_QUOTE_FIELD_ACCESS',
-		'PurchaseOrder'=>'LBL_PO_FIELD_ACCESS',
-		'SalesOrder'=>'LBL_SO_FIELD_ACCESS',
-		'Invoice'=>'LBL_INVOICE_FIELD_ACCESS'
-	      );
+$modArr=getFieldModuleAccessArray();
+
+ 
 $no_of_mod=sizeof($modArr);
 for($i=0;$i<$no_of_mod; $i++)
 {





More information about the vtigercrm-commits mailing list