Correzione filtri su supersearch per utenti non admin

This commit is contained in:
loviuz 2019-05-20 11:23:49 +02:00
parent 4496b3da0a
commit 090910ec20
1 changed files with 6 additions and 3 deletions

View File

@ -20,13 +20,16 @@ foreach ($fields as $name => $value) {
$query .= ', '.$value." AS '".str_replace("'", "\'", $name)."'";
}
$query .= ' FROM in_interventi WHERE idanagrafica IN('.implode(',', $idanagrafiche).') ';
$query .= ' FROM in_interventi ';
$where = [];
foreach ($fields as $name => $value) {
$query .= ' OR '.$value.' LIKE "%'.$term.'%"';
$where[] = $value.' LIKE "%'.$term.'%"';
}
$query .= Modules::getAdditionalsQuery('Interventi');
$query .= ' WHERE ('.implode(' OR ', $where).') ';
$query .= ' '.Modules::getAdditionalsQuery('Interventi');
$rs = $dbo->fetchArray($query);