[Vtigercrm-commits] [vtiger-commits] r10869 - /vtigercrm/branches/5.0.3/include/utils/SearchUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri May 11 10:18:44 EDT 2007
Author: saraj
Date: Fri May 11 08:18:39 2007
New Revision: 10869
Log:
Advanced Filters not working properly in Notes Module - Fixed. Fixes #3805
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 Fri May 11 08:18:39 2007
@@ -427,6 +427,7 @@
$result = $adb->query($sql);
$noofrows = $adb->num_rows($result);
$block = '';
+ $select_flag = '';
for($i=0; $i<$noofrows; $i++)
{
@@ -463,20 +464,19 @@
if($fieldlabel != 'Related to')
{
if ($i==0)
- $OPTION_SET .= "<option value=\'".$fieldtablename.".".$fieldcolname."\' selected>".$fieldlabel."</option>";
- elseif($fieldlabel == "Product Code")
- $OPTION_SET .= "<option value=\'".$fieldtablename.".".$fieldcolname."\'>".$mod_strings[$fieldlabel]."</option>";
- elseif($fieldcolname == "contactid")
- {
- $OPTION_SET .= "<option value=\'vtiger_contactdetails.lastname\'>".$app_strings['LBL_CONTACT_LAST_NAME']."</option>";
+ $select_flag = "selected";
+
+ if($fieldlabel == "Product Code")
+ $OPTION_SET .= "<option value=\'".$fieldtablename.".".$fieldcolname."\'".$select_flag.">".$mod_strings[$fieldlabel]."</option>";
+ elseif($fieldcolname == "contactid" || $fieldcolname == "contact_id")
+ {
+ $OPTION_SET .= "<option value=\'vtiger_contactdetails.lastname\' ".$select_flag.">".$app_strings['LBL_CONTACT_LAST_NAME']."</option>";
$OPTION_SET .= "<option value=\'vtiger_contactdetails.firstname\'>".$app_strings['LBL_CONTACT_FIRST_NAME']."</option>";
}
elseif($fieldcolname == "campaignid")
- {
- $OPTION_SET .= "<option value=\'vtiger_campaign.campaignname\'>".$mod_strings[$fieldlabel]."</option>";
- }
+ $OPTION_SET .= "<option value=\'vtiger_campaign.campaignname\' ".$select_flag.">".$mod_strings[$fieldlabel]."</option>";
else
- $OPTION_SET .= "<option value=\'".$fieldtablename.".".$fieldcolname."\'>".$fieldlabel."</option>";
+ $OPTION_SET .= "<option value=\'".$fieldtablename.".".$fieldcolname."\' ".$select_flag.">".$fieldlabel."</option>";
}
}
//Added to include Ticket ID in HelpDesk advance search
@@ -519,6 +519,11 @@
global $log;
$log->debug("Entering getSearch_criteria(".$criteria.",".$searchstring.",".$searchfield.") method ...");
$searchstring = ltrim(rtrim($searchstring));
+ if($searchfield == "vtiger_crmentity.modifiedtime" || $searchfield == "vtiger_crmentity.createdtime")
+ {
+ list($sdate,$stime) = split(" ",$searchstring);
+ $searchstring = getDBInsertDateValue($sdate)." ".$stime;
+ }
$where_string = '';
switch($criteria)
{
More information about the vtigercrm-commits
mailing list