diff --git a/html/admin_repo.php b/html/admin_repo.php index 7c2c3c82c..118ef164a 100644 --- a/html/admin_repo.php +++ b/html/admin_repo.php @@ -141,7 +141,14 @@ if ( isset ($_GET["action"]) ) { domaine, $_POST["FMOD_ID"]); echo_debug($Sql); - ExecSql($cn,$Sql); + ob_start(); + if ( pg_query($cn,$Sql)==false) { + ob_clean(); + ExecSql($cn,"delete from ac_dossier where dos_id=$l_id"); + echo "

Base de donnée mod".$_POST['FMOD_ID']." est accèdée, déconnectez-vous d'abord

"; + exit; + } + ob_flush(); $Res=ExecSql($cn,"insert into jnt_use_dos (use_id,dos_id) values (1,$l_id)"); // Connect to the new database $cn=DbConnect($l_id);