[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>";
- [Noalyss-commit] [noalyss] branch master updated (44dbd49 -> bc168d2), Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 07/119: prevent divide by zero in formula, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 09/119: compatibility PHP74 : join() : glue before piece, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 06/119: reconcilaction : possibility to select only one operation, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 13/119: Bug 1834 : order POST over GET,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 05/119: Bug : syntax error, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 04/119: Bug : use ilike instead of tilde, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 02/119: Bug : correct search remove ~, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 08/119: remove extract, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 03/119: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 01/119: Fix warning with empty array, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 10/119: Fix bug : cannot use % when searching NEW : space can be used now, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 14/119: doc, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 11/119: Improve use of the security, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 17/119: javascript : add function to concat 2 json objects, Dany De Bontridder, 2020/10/26