tested component fixed

This commit is contained in:
2026-04-19 17:38:35 +02:00
parent 66be442eb6
commit fa7997c980
4 changed files with 74 additions and 7 deletions
+6 -2
View File
@@ -13,7 +13,7 @@ try {
$iddatadb = intval($_POST['iddatadb']);
$idclient = isset($_POST['idclient']) ? (is_numeric($_POST['idclient']) ? intval($_POST['idclient']) : null) : null;
$clienteFornitoreId = isset($_POST['cliente_fornitore_id']) ? (is_numeric($_POST['cliente_fornitore_id']) ? intval($_POST['cliente_fornitore_id']) : null) : null;
$testedComponent = isset($_POST['tested_component']) ? trim((string)$_POST['tested_component']) : null;
$db = DBHandlerSelect::getInstance();
$pdo = $db->getConnection();
@@ -144,7 +144,11 @@ try {
$setParts[] = "cliente_fornitore_id = ?";
$params[] = $clienteFornitoreId;
}
// 5a3) tested_component (se presente)
if (isset($testedComponent)) {
$setParts[] = "tested_component = ?";
$params[] = ($testedComponent === '') ? null : $testedComponent;
}
// 5b) fixed fields dal POST
// QUI è il punto chiave: accettiamo SOLO colonne reali (realWhitelist),
// ma se dal JS arrivassero ancora key logiche, funzionerebbe uguale