Fix filtering
This commit is contained in:
parent
c35c9c4083
commit
57bae7cf17
|
@ -249,7 +249,7 @@ $group_options[$Group->Id()] = str_repeat( ' ', $depth ) . $Group->Name();
|
|||
|
||||
$MonitorIds = array_merge( $MonitorIds, dbFetchAll( 'SELECT MonitorId FROM Groups_Monitors WHERE GroupId IN (SELECT Id FROM Groups WHERE ParentId = ?)', 'MonitorId', array($group_id) ) );
|
||||
}
|
||||
$groupSql = " find_in_set( Id, '".implode( ',', $MonitorIds )."' )";
|
||||
$groupSql = " find_in_set( M.Id, '".implode( ',', $MonitorIds )."' )";
|
||||
}
|
||||
return $groupSql;
|
||||
} # end public static function get_group_sql( $group_id )
|
||||
|
|
|
@ -85,7 +85,7 @@ if ( ! is_array( $selected_monitor_ids ) ) {
|
|||
} # end foreach filter
|
||||
if ( ! empty( $user['MonitorIds'] ) ) {
|
||||
$ids = explode(',', $user['MonitorIds'] );
|
||||
$conditions[] = 'Id IN ('.implode(',',array_map( function(){return '?';}, $ids) ).')';
|
||||
$conditions[] = 'M.Id IN ('.implode(',',array_map( function(){return '?';}, $ids) ).')';
|
||||
$values += $ids;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue