mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
fixed a problem regarding search in extra fields for addressbook when using the advanced search dialog
This commit is contained in:
parent
db165536e1
commit
2bb4fd1df1
@ -286,7 +286,12 @@ class socontacts_sql extends so_sql
|
||||
if ($col{0} == '#') // search for a value in a certain custom field
|
||||
{
|
||||
unset($criteria[$col]);
|
||||
$criteria[] = $this->db->expression($this->extra_table,'(',array('contact_name'=>substr($col,1),'contact_value'=>$val),')');
|
||||
if ($op=='AND') {
|
||||
$criteria[] =$this->extra_table.'.contact_id in (select '.$this->extra_table.'.contact_id from '.$this->extra_table.' where '.
|
||||
"(contact_name='".substr($col,1)."' AND contact_value".($wildcard?' LIKE ':'=')."'".$wildcard.$val.$wildcard."'))";
|
||||
} else {
|
||||
$criteria[] = $this->db->expression($this->extra_table,'(',array('contact_name'=>substr($col,1),'contact_value'.($wildcard?' LIKE ':'=')."'".$wildcard.$val.$wildcard."'"),')');
|
||||
}
|
||||
$search_customfields = true;
|
||||
}
|
||||
elseif($col == 'cat_id') // search in comma-sep. cat-column
|
||||
|
Loading…
Reference in New Issue
Block a user