[Vtigercrm-commits] [vtiger-commits] r10968 - /vtigercrm/branches/5.0.3/include/utils/SearchUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue May 22 13:19:56 EDT 2007


Author: saraj
Date: Tue May 22 11:19:49 2007
New Revision: 10968

Log:
Basic Search is not working on Notes.Fixes #3868

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 Tue May 22 11:19:49 2007
@@ -76,6 +76,8 @@
 		}
 		if($fieldname == "accountname")
 			$fieldname = "account_id";
+		if($fieldname == "lastname" && $module !="Leads")
+			$fieldname = "contact_id";
 		$field_list .= "'".$fieldname."'";
 		$j++;
 	}
@@ -117,6 +119,8 @@
 					$fieldname = $focus->list_fields_name[$name];
 					
                         }
+			if($fieldname == "lastname" && $module != "Leads")
+				$fieldname = "contact_id";
                 }
 		else
                 {
@@ -124,6 +128,9 @@
 				$fieldname = 'crmid';
 			else
 				$fieldname = $focus->list_fields_name[$name];
+
+			if($fieldname == "lastname" && $module != "Leads")
+                                $fieldname = "contact_id";
                 }
 
                 if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] ==0 || in_array($fieldname,$field))
@@ -347,7 +354,6 @@
 				else
 					$search_string = getDBInsertDateValue($sdate);
 			}
-			echo $search_string;
 			// Added to fix errors while searching check box type fields(like product active. ie. they store 0 or 1. we search them as yes or no) in basic search.
 			if ($uitype == 56)
 			{





More information about the vtigercrm-commits mailing list