mirror of
https://github.com/JMP-MS/ASPIC.git
synced 2026-10-27 16:07:10 +00:00
V1.17.18 Modifications consignes correction bugs
This commit is contained in:
+9
-1
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user