[Vtigercrm-commits] [vtiger-commits] r10959 - /vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue May 22 08:51:17 EDT 2007
Author: jerrydgeorge
Date: Tue May 22 06:50:28 2007
New Revision: 10959
Log:
Security Issue in Thunderbird Search has been fixed
Modified:
vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php
Modified: vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php (original)
+++ vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php Tue May 22 06:50:28 2007
@@ -293,22 +293,21 @@
for($index = 0 , $row = $this->db->fetchByAssoc($result, $index); $row && $index <$rows_found;$index++, $row = $this->db->fetchByAssoc($result, $index))
{
$contact = Array();
- foreach($permitted_field_lists as $columnName)
- {
- if ($columnName == "lastname" || $columnName == "firstname" || $columnName == "email")
- {
- $contact[$columnName] = $row[$columnName];
- }
- else
- {
- $contact[$columnName] = "";
- }
- }
+
+ $contact[lastname] = in_array("lastname",$permitted_field_lists) ? $row[lastname] : "";
+ $contact[firstname] = in_array("firstname",$permitted_field_lists)? $row[firstname] : "";
+ $contact[email] = in_array("email",$permitted_field_lists) ? $row[email] : "";
+
+
if(in_array("accountid",$permitted_field_lists))
{
$contact[accountname] = $row[accountname];
$contact[account_id] = $row[accountid];
- }
+ }else
+ {
+ $contact[accountname] = "";
+ $contact[account_id] = "";
+ }
$contact[contactid] = $row[contactid];
$list[] = $contact;
}
More information about the vtigercrm-commits
mailing list