#11537 Fix metaconsole inventory and hd traces

This commit is contained in:
miguel angel rasteu 2023-09-06 10:28:44 +02:00
parent fd94a4ff69
commit f8f13227f8
2 changed files with 7 additions and 8 deletions

View File

@ -184,7 +184,6 @@ class ConfigPEN extends HTML
return db_get_value_sql($sql);
}
hd($sql, true);
return db_get_all_rows_sql($sql);
}

View File

@ -77,8 +77,6 @@ function inventory_get_data(
}
if ($inventory_search_string != '') {
hd(1, true);
hd($inventory_search_string, true);
array_push($where, "REPLACE(tagent_module_inventory.data, ' ', ' ') LIKE '%".$inventory_search_string."%'");
}
@ -748,8 +746,6 @@ function inventory_get_datatable(
}
if ($inventory_search_string != '') {
hd(2, true);
hd($inventory_search_string, true);
array_push($where, "REPLACE(tagente_datos_inventory.data, ' ', ' ') LIKE '%".$inventory_search_string."%'");
}
@ -799,7 +795,13 @@ function inventory_get_datatable(
$data_rows = explode(PHP_EOL, $row['data_inventory']);
foreach ($data_rows as $data_key => $data_value) {
if (empty($data_value) === false && strpos(str_replace(' ', ' ', $data_value), $inventory_search_string)) {
if (empty($inventory_search_string) !== true) {
$search_check = strpos(str_replace(' ', ' ', $data_value), $inventory_search_string);
} else {
$search_check = true;
}
if (empty($data_value) === false && $search_check !== false) {
$row['data'] = $data_value;
$modules[$row['name']][$row['name_agent'].'-'.$data_key.'-'.$data_value] = $row;
}
@ -895,8 +897,6 @@ function get_data_basic_info_sql($params, $count=false)
' AND ( REPLACE(alias, " ", " ") LIKE "%%%s%%" )',
$params['search']
);
hd(3, true);
hd($params['search'], true);
}
if ($params['utimestamp'] > 0 && $count === false) {