From cdd6551e9cca7bded6d9775c80512157d5a6df67 Mon Sep 17 00:00:00 2001 From: "r.mubarakzyanov" Date: Sat, 14 Mar 2026 19:09:17 +0300 Subject: [PATCH] remove validation simulate --- public/userarea/validate_export.php | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/public/userarea/validate_export.php b/public/userarea/validate_export.php index f9f9c09..b4176be 100644 --- a/public/userarea/validate_export.php +++ b/public/userarea/validate_export.php @@ -52,8 +52,8 @@ $validators[] = function (int $iddatadb, array $ctx): array { return [[ 'field' => 'parts', 'message' => 'Matrice mancante — il LIMS rifiuterà l\'esportazione. ' - . 'Part senza matrice: ' . implode(', ', $missing) - . '. Aprire la sezione Parts e assegnare la matrice.', + . 'Part senza matrice: ' . implode(', ', $missing) + . '. Aprire la sezione Parts e assegnare la matrice.', ]]; } return []; @@ -70,8 +70,6 @@ try { exit; } - $simulate = ($_ENV['SIMULATE_EXPORT_LIMS'] ?? env('SIMULATE_EXPORT_LIMS') ?? '') === 'true'; - // ── Prefetch all data in bulk ─────────────────────────────────────────── $iddatadbList = array_column($rows, 'iddatadb'); @@ -97,21 +95,6 @@ try { $iddatadb = (int)$rowInfo['iddatadb']; $index = $rowInfo['index']; - // Simulation: every even iddatadb gets a fake matrice error - if ($simulate && $iddatadb % 2 === 0) { - $results[$index] = [ - 'valid' => false, - 'iddatadb' => $iddatadb, - 'errors' => [[ - 'field' => 'parts', - 'message' => 'Matrice mancante — il LIMS rifiuterà l\'esportazione. ' - . 'Part senza matrice: PART-001, PART-003. ' - . 'Aprire la sezione Parts e assegnare la matrice.', - ]], - ]; - continue; - } - // Build context for validators $ctx = [ 'parts' => $partsInfo[$iddatadb] ?? [],