[Vtigercrm-commits] [vtiger-commits] r7272 - in /vtigercrm/trunk/modules/Users: LoginHistory.php RoleDragDrop.php SaveOrgSharing.php SaveProfile.php SaveRole.php TabCustomise.php UpdateDefaultFieldLevelAccess.php UpdateProfileChanges.php UsersAjax.php massChangeStatus.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Jun 19 12:29:14 EDT 2006


Author: richie
Date: Mon Jun 19 10:28:50 2006
New Revision: 7272

Log:
fixed the vtiger_ prefix issues

Modified:
    vtigercrm/trunk/modules/Users/LoginHistory.php
    vtigercrm/trunk/modules/Users/RoleDragDrop.php
    vtigercrm/trunk/modules/Users/SaveOrgSharing.php
    vtigercrm/trunk/modules/Users/SaveProfile.php
    vtigercrm/trunk/modules/Users/SaveRole.php
    vtigercrm/trunk/modules/Users/TabCustomise.php
    vtigercrm/trunk/modules/Users/UpdateDefaultFieldLevelAccess.php
    vtigercrm/trunk/modules/Users/UpdateProfileChanges.php
    vtigercrm/trunk/modules/Users/UsersAjax.php
    vtigercrm/trunk/modules/Users/massChangeStatus.php

Modified: vtigercrm/trunk/modules/Users/LoginHistory.php
==============================================================================
--- vtigercrm/trunk/modules/Users/LoginHistory.php (original)
+++ vtigercrm/trunk/modules/Users/LoginHistory.php Mon Jun 19 10:28:50 2006
@@ -31,7 +31,7 @@
 	var $status;
 	var $module_name = "Users";
 
-	var $table_name = "loginhistory";
+	var $table_name = "vtiger_loginhistory";
 
 	var $object_name = "LoginHistory";
 	

Modified: vtigercrm/trunk/modules/Users/RoleDragDrop.php
==============================================================================
--- vtigercrm/trunk/modules/Users/RoleDragDrop.php (original)
+++ vtigercrm/trunk/modules/Users/RoleDragDrop.php Mon Jun 19 10:28:50 2006
@@ -15,7 +15,7 @@
 
 
 global $adb;
-$query = "select * from vtiger_role where vtiger_roleid='".$toid."'";
+$query = "select * from vtiger_role where roleid='".$toid."'";
 $result=$adb->query($query);
 $parentRoleList=$adb->query_result($result,0,'parentrole');
 $replace_with=$parentRoleList;
@@ -50,7 +50,7 @@
 	$mvParString=$replace_with.$subPar[1];
 	$subDepth=$mvRoleInfo[2];
 	$mvDepth=$orgDepth+(($subDepth-$stdDepth)+1);
-	$query="update vtiger_role set parentrole='".$mvParString."',depth=".$mvDepth." where vtiger_roleid='".$mvRoleId."'";
+	$query="update vtiger_role set parentrole='".$mvParString."',depth=".$mvDepth." where roleid='".$mvRoleId."'";
 	//echo $query;
 	$adb->query($query);
 		

Modified: vtigercrm/trunk/modules/Users/SaveOrgSharing.php
==============================================================================
--- vtigercrm/trunk/modules/Users/SaveOrgSharing.php (original)
+++ vtigercrm/trunk/modules/Users/SaveOrgSharing.php Mon Jun 19 10:28:50 2006
@@ -22,19 +22,19 @@
 	$tabid=$adb->query_result($result2,$i,'tabid');
 		$reqval = $tabid.'_per';	
 		$permission=$_REQUEST[$reqval];
-		$sql7="update vtiger_def_org_share set permission=".$permission." where vtiger_tabid=".$tabid." and ruleid=".$ruleid;
+		$sql7="update vtiger_def_org_share set permission=".$permission." where tabid=".$tabid." and ruleid=".$ruleid;
 		$adb->query($sql7);
 
 		if($tabid == 6)
 		{
-			$sql8="update vtiger_def_org_share set permission=".$permission." where vtiger_tabid=4";
+			$sql8="update vtiger_def_org_share set permission=".$permission." where tabid=4";
 			$adb->query($sql8);
 			
 		}
 
 		if($tabid == 9)
 		{
-			$sql8="update vtiger_def_org_share set permission=".$permission." where vtiger_tabid=16";
+			$sql8="update vtiger_def_org_share set permission=".$permission." where tabid=16";
 			$adb->query($sql8);
 			
 		}

Modified: vtigercrm/trunk/modules/Users/SaveProfile.php
==============================================================================
--- vtigercrm/trunk/modules/Users/SaveProfile.php (original)
+++ vtigercrm/trunk/modules/Users/SaveProfile.php Mon Jun 19 10:28:50 2006
@@ -28,9 +28,9 @@
 
 
 //Retreiving the vtiger_tabs permission array
-$tab_perr_result = $adb->query("select * from vtiger_profile2tab where vtiger_profileid=1");
-$act_perr_result = $adb->query("select * from vtiger_profile2standardpermissions where vtiger_profileid=1");
-$act_utility_result = $adb->query("select * from vtiger_profile2utility where vtiger_profileid=1");
+$tab_perr_result = $adb->query("select * from vtiger_profile2tab where profileid=1");
+$act_perr_result = $adb->query("select * from vtiger_profile2standardpermissions where profileid=1");
+$act_utility_result = $adb->query("select * from vtiger_profile2utility where profileid=1");
 $num_tab_per = $adb->num_rows($tab_perr_result);
 $num_act_per = $adb->num_rows($act_perr_result);
 $num_act_util_per = $adb->num_rows($act_utility_result);

Modified: vtigercrm/trunk/modules/Users/SaveRole.php
==============================================================================
--- vtigercrm/trunk/modules/Users/SaveRole.php (original)
+++ vtigercrm/trunk/modules/Users/SaveRole.php Mon Jun 19 10:28:50 2006
@@ -17,12 +17,12 @@
 {
 	if($mode != 'edit')
 	{
-		$query = 'select vtiger_rolename from vtiger_role where vtiger_rolename="'.$rolename.'"';
+		$query = 'select rolename from vtiger_role where rolename="'.$rolename.'"';
 	}
 	else
 	{
 		$roleid=$_REQUEST['roleid'];
-		$query = 'select vtiger_rolename from vtiger_role where vtiger_rolename="'.$rolename.'" and vtiger_roleid !="'.$roleid.'"';
+		$query = 'select rolename from vtiger_role where rolename="'.$rolename.'" and roleid !="'.$roleid.'"';
 
 	}
 	$result = $adb->query($query);

Modified: vtigercrm/trunk/modules/Users/TabCustomise.php
==============================================================================
--- vtigercrm/trunk/modules/Users/TabCustomise.php (original)
+++ vtigercrm/trunk/modules/Users/TabCustomise.php Mon Jun 19 10:28:50 2006
@@ -154,7 +154,7 @@
 </style>
 </head>
 <?
-		$tabavail="SELECT vtiger_tabid,name from vtiger_tab where presence !=2";
+		$tabavail="SELECT tabid,name from vtiger_tab where presence !=2";
 		$tabrow=$adb->query($tabavail);
 		if($adb->num_rows($tabrow) != 0)
 		{
@@ -163,7 +163,7 @@
 				$availabletab[]=$result;
 			}
 		}	
-		$tabsel="SELECT vtiger_tabid,name from vtiger_tab where presence=0 order by vtiger_tabsequence";
+		$tabsel="SELECT tabid,name from vtiger_tab where presence=0 order by tabsequence";
 		$tabrow=$adb->query($tabsel);
 		if($adb->num_rows($tabrow) != 0)
 		{

Modified: vtigercrm/trunk/modules/Users/UpdateDefaultFieldLevelAccess.php
==============================================================================
--- vtigercrm/trunk/modules/Users/UpdateDefaultFieldLevelAccess.php (original)
+++ vtigercrm/trunk/modules/Users/UpdateDefaultFieldLevelAccess.php Mon Jun 19 10:28:50 2006
@@ -40,7 +40,7 @@
 		}		
 
 		//Updating the database
-		$update_query = "update vtiger_def_org_field set visible=".$visible_value." where vtiger_fieldid='".$fieldid."' and vtiger_tabid=".$tab_id;
+		$update_query = "update vtiger_def_org_field set visible=".$visible_value." where fieldid='".$fieldid."' and tabid=".$tab_id;
 		$adb->query($update_query);
 
 	}

Modified: vtigercrm/trunk/modules/Users/UpdateProfileChanges.php
==============================================================================
--- vtigercrm/trunk/modules/Users/UpdateProfileChanges.php (original)
+++ vtigercrm/trunk/modules/Users/UpdateProfileChanges.php Mon Jun 19 10:28:50 2006
@@ -23,9 +23,9 @@
 	$return_action = 'ListProfiles';
 
 //Retreiving the vtiger_tabs permission array
-$tab_perr_result = $adb->query("select * from vtiger_profile2tab where vtiger_profileid=".$profileid);
-$act_perr_result = $adb->query("select * from vtiger_profile2standardpermissions where vtiger_profileid=".$profileid);
-$act_utility_result = $adb->query("select * from vtiger_profile2utility where vtiger_profileid=".$profileid);
+$tab_perr_result = $adb->query("select * from vtiger_profile2tab where profileid=".$profileid);
+$act_perr_result = $adb->query("select * from vtiger_profile2standardpermissions where profileid=".$profileid);
+$act_utility_result = $adb->query("select * from vtiger_profile2utility where profileid=".$profileid);
 $num_tab_per = $adb->num_rows($tab_perr_result);
 $num_act_per = $adb->num_rows($act_perr_result);
 $num_act_util_per = $adb->num_rows($act_utility_result);
@@ -37,9 +37,9 @@
 	$edit_all_req=$_REQUEST['edit_all'];
 	$edit_all = getPermissionValue($edit_all_req);
 
-	$update_query = "update  vtiger_profile2globalpermissions set globalactionpermission=".$view_all." where globalactionid=1 and vtiger_profileid=".$profileid;
+	$update_query = "update  vtiger_profile2globalpermissions set globalactionpermission=".$view_all." where globalactionid=1 and profileid=".$profileid;
 	$adb->query($update_query);
-	$update_query = "update  vtiger_profile2globalpermissions set globalactionpermission=".$edit_all." where globalactionid=2 and vtiger_profileid=".$profileid;
+	$update_query = "update  vtiger_profile2globalpermissions set globalactionpermission=".$edit_all." where globalactionid=2 and profileid=".$profileid;
 	$adb->query($update_query);
 
 	
@@ -59,11 +59,11 @@
 			{
 				$permission_value = 1;
 			}
-			$update_query = "update vtiger_profile2tab set permissions=".$permission_value." where vtiger_tabid=".$tab_id." and vtiger_profileid=".$profileid;
+			$update_query = "update vtiger_profile2tab set permissions=".$permission_value." where tabid=".$tab_id." and profileid=".$profileid;
 			$adb->query($update_query);
 			if($tab_id ==9)
 			{
-				$update_query = "update vtiger_profile2tab set permissions=".$permission_value." where vtiger_tabid=16 and vtiger_profileid=".$profileid;
+				$update_query = "update vtiger_profile2tab set permissions=".$permission_value." where tabid=16 and profileid=".$profileid;
 				$adb->query($update_query);
 			}
 		}
@@ -99,11 +99,11 @@
 			{
 				$permission_value = 1;
 			}
-			$update_query = "update vtiger_profile2standardpermissions set permissions=".$permission_value." where vtiger_tabid=".$tab_id." and Operation=".$action_id." and vtiger_profileid=".$profileid;
+			$update_query = "update vtiger_profile2standardpermissions set permissions=".$permission_value." where tabid=".$tab_id." and Operation=".$action_id." and profileid=".$profileid;
 			$adb->query($update_query);
 			if($tab_id ==9)
 			{
-				$update_query = "update vtiger_profile2standardpermissions set permissions=".$permission_value." where vtiger_tabid=16 and Operation=".$action_id." and vtiger_profileid=".$profileid;
+				$update_query = "update vtiger_profile2standardpermissions set permissions=".$permission_value." where tabid=16 and Operation=".$action_id." and profileid=".$profileid;
 				$adb->query($update_query);
 			}
 
@@ -132,7 +132,7 @@
 			$permission_value = 1;
 		}
 
-		$update_query = "update vtiger_profile2utility set permission=".$permission_value." where vtiger_tabid=".$tab_id." and vtiger_activityid=".$action_id." and vtiger_profileid=".$profileid;
+		$update_query = "update vtiger_profile2utility set permission=".$permission_value." where tabid=".$tab_id." and activityid=".$action_id." and profileid=".$profileid;
 
 		$adb->query($update_query);
 
@@ -167,7 +167,7 @@
 			$visible_value = 0;
 		}
 		//Updating the database
-		$update_query = "update vtiger_profile2field set visible=".$visible_value." where vtiger_fieldid='".$fieldid."' and vtiger_profileid=".$profileid." and vtiger_tabid=".$tab_id;
+		$update_query = "update vtiger_profile2field set visible=".$visible_value." where fieldid='".$fieldid."' and profileid=".$profileid." and tabid=".$tab_id;
 		$adb->query($update_query);
 
 	}

Modified: vtigercrm/trunk/modules/Users/UsersAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Users/UsersAjax.php (original)
+++ vtigercrm/trunk/modules/Users/UsersAjax.php Mon Jun 19 10:28:50 2006
@@ -41,7 +41,7 @@
 	$sql="select * from vtiger_announcement where creatorid=".$current_user->id;
 	$is_announce=$adb->query($sql);
 	if($adb->num_rows($is_announce) > 0)
-		$query="update vtiger_announcement set vtiger_announcement=".$adb->formatString("announcement","announcement",$announcement).",time=".$adb->formatString("announcement","time",$date_var).",title='announcement' where creatorid=".$current_user->id;
+		$query="update vtiger_announcement set announcement=".$adb->formatString("announcement","announcement",$announcement).",time=".$adb->formatString("announcement","time",$date_var).",title='announcement' where creatorid=".$current_user->id;
 	else
 		$query="insert into vtiger_announcement values (".$current_user->id.",".$adb->formatString("announcement","announcement",$announcement).",'announcement','".$date_var."')";
 	$result=$adb->query($query);

Modified: vtigercrm/trunk/modules/Users/massChangeStatus.php
==============================================================================
--- vtigercrm/trunk/modules/Users/massChangeStatus.php (original)
+++ vtigercrm/trunk/modules/Users/massChangeStatus.php Mon Jun 19 10:28:50 2006
@@ -39,7 +39,7 @@
 }
 function updateStatus()
 {
-	var vtiger_leadstatusvalue=document.setLeadStatus.lead_status.value
+	var leadstatusvalue=document.setLeadStatus.lead_status.value
 	//alert(leadstatusvalue);
 	document.setLeadStatus.leadval.value=leadstatusvalue;
 	document.setLeadStatus.action="index.php?module=Users&action=updateLeadDBStatus"





More information about the vtigercrm-commits mailing list