./program/include/rcube_contacts.php:
/**
* Search contacts
*
* @param array List of fields to search in
* @param string Search value
* @param boolean True if results are requested, False if count only
* @return Indexed list of contact records and 'count' value
*/
function search($fields, $value, $strict=false, $select=true)
{
if (!is_array($fields))
$fields = array($fields);
$add_where = array();
foreach ($fields as $col)
{
if ($col == 'ID' || $col == $this->primary_key)
{
$ids = !is_array($value) ? explode(',', $value) : $value;
$add_where[] = $this->primary_key.' IN ('.join(',', $ids).')';
}
else if ($strict)
$add_where[] = $this->db->quoteIdentifier($col).'='.$this->db->quote($value);
else
//$add_where[] = $this->db->ilike($col, '%'.$value.'%');
$add_where[] = $this->db->ilike($col, $value.'%');
}
if (!empty($add_where))
{
$this->set_search_set(join(' OR ', $add_where));
if ($select)
$this->list_records();
else
$this->result = $this->count();
}
return $this->result;
}
... see the commented line. I think that's what you are looking for.