[Vtigercrm-commits] [vtiger-commits] r10901 - /vtigercrm/branches/5.0.3/include/utils/SearchUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon May 14 03:33:08 EDT 2007
Author: richie
Date: Mon May 14 01:33:04 2007
New Revision: 10901
Log:
fix for accounts module basic search. --minnie
Modified:
vtigercrm/branches/5.0.3/include/utils/SearchUtils.php
Modified: vtigercrm/branches/5.0.3/include/utils/SearchUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/SearchUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/SearchUtils.php Mon May 14 01:33:04 2007
@@ -311,9 +311,9 @@
$module = 'Contacts';
$search_field = 'lastname';
}
- if($search_field == "accountname")
+ if($search_field == "accountname" && $module != "Accounts")
$search_field = "account_id";
- $qry="select vtiger_field.columnname,tablename from vtiger_tab inner join vtiger_field on vtiger_field.tabid=vtiger_tab.tabid where name='".$module."' and (fieldname='".$search_field."' or columnname='".$search_field."')";
+ $qry="select vtiger_field.columnname,tablename from vtiger_tab inner join vtiger_field on vtiger_field.tabid=vtiger_tab.tabid where vtiger_tab.name='".$module."' and (fieldname='".$search_field."' or columnname='".$search_field."')";
$result = $adb->query($qry);
$noofrows = $adb->num_rows($result);
if($noofrows!=0)
More information about the vtigercrm-commits
mailing list