noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 13/119: Bug 1834 : order POST over GET


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 13/119: Bug 1834 : order POST over GET
Date: Mon, 26 Oct 2020 18:27:03 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 4628b10f2a3f3e5f044049bdc27629bd35bcdfff
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Mon Sep 21 22:11:14 2020 +0200

    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 c957df9..49a2dcc 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 e1930ef..93f1775 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('<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>";



reply via email to

[Prev in Thread] Current Thread [Next in Thread]