V1.17.18 Modifications consignes correction bugs

This commit is contained in:
2026-09-08 15:28:26 +00:00
parent 9d537a9b36
commit 67614908c3
7 changed files with 249 additions and 57 deletions
+9 -1
View File
@@ -321,7 +321,15 @@ try {
}
$data = json_decode(file_get_contents('php://input'), true) ?? [];
$erreurConsigne = appliquerConsignes($pdo, 'Contacts', 'Modification', $data, $agentConsigne, $journalisationsIA, $avertissementsIA);
// Dernier paramètre (8 septembre 2026) : identifiant du contact
// en cours de modification, transmis pour qu'une consigne
// d'unicité (ex. mail/portable déjà utilisé, voir
// consignes_fonctions.php) puisse exclure cette fiche elle-même
// de sa recherche — sans quoi ré-enregistrer un contact sans
// changer son mail se bloquerait lui-même. Absent en POST
// ci-dessus : en Création, aucun contact n'existe encore à
// exclure.
$erreurConsigne = appliquerConsignes($pdo, 'Contacts', 'Modification', $data, $agentConsigne, $journalisationsIA, $avertissementsIA, (int)$_GET['id']);
if ($erreurConsigne !== null) {
http_response_code(400);
echo json_encode(['error' => $erreurConsigne, 'agent' => $agentConsigne]);