Bug 1834 : order POST over GET

This commit is contained in:
Dany De Bontridder 2020-09-21 22:11:14 +02:00
parent ecde330303
commit 4628b10f2a
2 changed files with 6 additions and 9 deletions

View file

@ -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();

View file

@ -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('<form id="%s" method="POST" ACTION="%s">',$p_id,NOALYSS_URL."/do.php?".http_build_query([
"ac"=>$a_code[0]['code'],"gDossier"=>Dossier::id()
]));
$r=sprintf('<form id="%s" method="POST" ACTION="%s">',$p_id,NOALYSS_URL."/do.php?".Dossier::get());
$r.=Dossier::hidden();
// select the menu where the operation will be duplicated
$r.="<p>";