[Vtigercrm-commits] [vtiger development] #4280: Wrong Link in Contacts list
vtiger development
vtiger-tickets at trac.vtiger.com
Wed Sep 26 17:07:41 EDT 2007
#4280: Wrong Link in Contacts list
------------------------+---------------------------------------------------
Reporter: Klaus | Owner: developer
Type: defect | Status: new
Priority: unassigned | Milestone: 5.0.4
Component: vtigercrm | Version: 5.0.3
Keywords: |
------------------------+---------------------------------------------------
When you delete an account, then this is marked as deleted. If you then
create an account with the same name, the link in the Contacts list to
this account, could have the id of the previous deleted account.
The reason: In the file ListViewUtils.php, the accountId is found by
selecting the account with the given accountName. This SQL statement does
not filter for deleted datasets.
I modified the function at the end of this file:
{{{
function getAccountId($account_name)
{
global $log;
$log->info("in getAccountId ".$account_name);
global $adb;
if($account_name != '')
{
// for avoid single quotes error
$slashes_account_name = popup_from_html($account_name);
$sql = "select accountid from vtiger_account INNER JOIN
vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_account.accountid
where vtiger_crmentity.deleted = 0 and
vtiger_account.accountname='".$slashes_account_name."'";
$result = $adb->query($sql);
$accountid = $adb->query_result($result,0,"accountid");
}
return $accountid;
}
}}}
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/4280>
vtiger development <http://trac.vtiger.com/>
vtigerCRM
More information about the vtigercrm-commits
mailing list