From 4628b10f2a3f3e5f044049bdc27629bd35bcdfff Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Mon, 21 Sep 2020 22:11:14 +0200 Subject: [PATCH] Bug 1834 : order POST over GET --- html/do.php | 6 ++++-- include/class/acc_operation.class.php | 9 ++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/html/do.php b/html/do.php index c957df934..49a2dccea 100644 --- a/html/do.php +++ b/html/do.php @@ -241,8 +241,10 @@ if (isset($_REQUEST['ac'])) fclose($file_loginput); } - $_REQUEST['ac']= trim(strtoupper($_REQUEST['ac'])); - $AC=$http->request('ac'); + $ac_post = trim(strtoupper($http->post("ac","string",""))); + $ac_get = trim(strtoupper($http->get("ac","string",""))); + + $AC=($ac_post == "")?$ac_get:$ac_post; $user_profile=$g_user->get_profile(); diff --git a/include/class/acc_operation.class.php b/include/class/acc_operation.class.php index e1930efc1..93f1775fd 100644 --- a/include/class/acc_operation.class.php +++ b/include/class/acc_operation.class.php @@ -747,14 +747,9 @@ class Acc_Operation $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=sprintf('',$p_id,NOALYSS_URL."/do.php?".Dossier::get()); $r.=Dossier::hidden(); // select the menu where the operation will be duplicated $r.="

";