From 44dbd495a6ee269b516ba2e329e82cda531d09ad Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Mon, 21 Sep 2020 21:40:50 +0200 Subject: [PATCH] Bug 1834 : duplicate , cannot confirm an duplicated operation because the $_GET is taken in priority --- include/class/acc_operation.class.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/include/class/acc_operation.class.php b/include/class/acc_operation.class.php index 7639d9d26..e1930efc1 100644 --- a/include/class/acc_operation.class.php +++ b/include/class/acc_operation.class.php @@ -741,17 +741,22 @@ class Acc_Operation $operation = $this->get_quant(); $array=$operation->compute_array(); global $g_user; - // Prepare the form - $r='
'; - $r.=Dossier::hidden(); $a_code=$this->db->get_array("select code from v_menu_dependency vmd where me_code=$1 and p_id=$2", array( $operation->signature,$g_user->get_profile())); - - // select the menu where the operation will be duplicated if ( empty ($a_code)) { $r.=_("Menu invalide"); return $r; } + /** + * @bug : if several menu possible , will use only the first one, because request take first the GET and after + * the POST + */ + // Prepare the form + $r=sprintf('',$p_id,NOALYSS_URL."/do.php?".http_build_query([ + "ac"=>$a_code[0]['code'],"gDossier"=>Dossier::id() + ])); + $r.=Dossier::hidden(); + // select the menu where the operation will be duplicated $r.="

"; $r.="