[Vtigercrm-commits] [vtiger-commits] r5356 - /vtigercrm/trunk/include/utils/SearchUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Apr 25 10:26:35 EDT 2006
Author: saraj
Date: Tue Apr 25 08:26:31 2006
New Revision: 5356
Log:
Basic search - assigned to in lead. Fixes #164, and refs #164
Modified:
vtigercrm/trunk/include/utils/SearchUtils.php
Modified: vtigercrm/trunk/include/utils/SearchUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/SearchUtils.php (original)
+++ vtigercrm/trunk/include/utils/SearchUtils.php Tue Apr 25 08:26:31 2006
@@ -233,11 +233,12 @@
$where .= " or ";
}
}
- $where.=")";
+ $where.=" or groups.groupname like '%".$search_string."%')";
}
else
{
- $where="$table_name.$column_name =''";
+ //$where="$table_name.$column_name =''";
+ $where="groups.groupname like '%".$search_string."%' ";
}
return $where;
}
@@ -428,7 +429,15 @@
$tab_col = str_replace('\'','',stripslashes($_REQUEST[$table_colname]));
$srch_cond = str_replace('\'','',stripslashes($_REQUEST[$search_condition]));
$srch_val = $_REQUEST[$search_value];
- $adv_string .= " ".getSearch_criteria($srch_cond,$srch_val,$tab_col)." ".$matchtype;
+ if($tab_col == "crmentity.smownerid")
+ {
+ $adv_string .= " (".getSearch_criteria($srch_cond,$srch_val,'users.user_name')." or";
+ $adv_string .= " ".getSearch_criteria($srch_cond,$srch_val,'groups.groupname')." )".$matchtype;
+ }
+ else
+ {
+ $adv_string .= " ".getSearch_criteria($srch_cond,$srch_val,$tab_col)." ".$matchtype;
+ }
}
$where=$adv_string;
}
More information about the vtigercrm-commits
mailing list