mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-23 14:28:45 +01:00
Backport r29732 - Multi select filter matches any record with that value selected
This commit is contained in:
parent
69938436a9
commit
9db6808467
@ -760,11 +760,25 @@ class infolog_so
|
|||||||
}
|
}
|
||||||
if ($col[0] == '#' && $query['custom_fields'] && $data)
|
if ($col[0] == '#' && $query['custom_fields'] && $data)
|
||||||
{
|
{
|
||||||
$filtermethod .= " AND main.info_id IN (SELECT DISTINCT info_id FROM $this->extra_table WHERE ".
|
$filtermethod .= " AND main.info_id IN (SELECT DISTINCT info_id FROM $this->extra_table WHERE ";
|
||||||
$this->db->expression($this->extra_table,array(
|
$custom_fields = config::get_customfields('infolog');
|
||||||
|
|
||||||
|
if($custom_fields[substr($col,1)]['type'] == 'select' && $custom_fields[substr($col,1)]['rows'] > 1)
|
||||||
|
{
|
||||||
|
// Multi-select - any entry with the filter value selected matches
|
||||||
|
$filtermethod .= $this->db->expression($this->extra_table, array(
|
||||||
|
'info_extra_name' => substr($col,1),
|
||||||
|
"CONCAT(',',info_extra_value,',') LIKE '%,$data,%'"
|
||||||
|
)).')';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$filtermethod .= $this->db->expression($this->extra_table,array(
|
||||||
'info_extra_name' => substr($col,1),
|
'info_extra_name' => substr($col,1),
|
||||||
'info_extra_value' => $data,
|
'info_extra_value' => $data,
|
||||||
)).')';
|
)).')';
|
||||||
|
}
|
||||||
|
|
||||||
$cfcolfilter++;
|
$cfcolfilter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user