$idimpianto) { $temp[] = 'idimpianto='.prepare($idimpianto); } $where[] = '('.implode(' OR ', $temp).')'; if (!empty($search)) { $search_fields[] = 'nome LIKE '.prepare('%'.$search.'%'); } $results = AJAX::selectResults($query, $where, $filter, $search, $limit, $custom); $data = $results['results']; foreach ($data as $key => $value) { $matricola = Ini::getValue($value['contenuto'], 'Matricola'); $data[$key]['text'] = (empty($matricola) ? '' : $matricola.' - ').$data[$key]['text']; unset($data[$key]['contenuto']); } $results['results'] = $data; } break; }