';
- if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) {
+ if ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) {
print img_picto('', 'service');
print $form->select_produits($task_time->fk_product, 'fk_product', '1', 0, $projectstatic->thirdparty->price_level, 1, 2, '', 1, array(), $projectstatic->thirdparty->id, 'None', 0, 'maxwidth500', 0, '', null, 1);
} elseif (!empty($task_time->fk_product)) {
@@ -2395,7 +2395,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
if ($task_time->invoice_id) {
$result = $tmpinvoice->fetch($task_time->invoice_id);
if ($result > 0) {
- if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) {
+ if ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) {
print $formproject->selectInvoiceAndLine($task_time->invoice_id, $task_time->invoice_line_id, 'invoiceid', 'invoicelineid', 'maxwidth500', array('p.rowid' => $projectstatic->id));
} else {
print $tmpinvoice->getNomUrl(1);
diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php
index 484b3bab1d3..b4d6f415b33 100644
--- a/htdocs/public/agenda/agendaexport.php
+++ b/htdocs/public/agenda/agendaexport.php
@@ -178,7 +178,7 @@ if ($reshook < 0) {
llxFooterVierge();
} elseif (empty($reshook)) {
// Check exportkey
- if (empty($_GET["exportkey"]) || getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY') != $_GET["exportkey"]) {
+ if (!GETPOST("exportkey") || getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY') != GETPOST("exportkey")) {
$user->getrights();
top_httphead();
@@ -328,13 +328,13 @@ if ($format == 'rss') {
$result = $agenda->build_exportfile($format, $type, $cachedelay, $filename, $filters, $exportholidays);
if ($result >= 0) {
$attachment = false;
- if (isset($_GET["attachment"])) {
- $attachment = $_GET["attachment"];
+ if (GETPOSTISSET("attachment")) {
+ $attachment = GETPOST("attachment");
}
//$attachment = false;
$contenttype = 'application/rss+xml';
- if (isset($_GET["contenttype"])) {
- $contenttype = $_GET["contenttype"];
+ if (GETPOSTISSET("contenttype")) {
+ $contenttype = GETPOST("contenttype");
}
//$contenttype='text/plain';
$outputencoding = 'UTF-8';
diff --git a/htdocs/public/eventorganization/subscriptionok.php b/htdocs/public/eventorganization/subscriptionok.php
index e432909c0a2..fab5a6e70bf 100644
--- a/htdocs/public/eventorganization/subscriptionok.php
+++ b/htdocs/public/eventorganization/subscriptionok.php
@@ -42,7 +42,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
-// TODO This should be useless. Because entity must be retrieve from object ref and not from url.
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php
index b3c02132dde..6f4525031ea 100644
--- a/htdocs/public/members/new.php
+++ b/htdocs/public/members/new.php
@@ -53,6 +53,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php
index ead24c23bd1..2862d9004b0 100644
--- a/htdocs/public/members/public_card.php
+++ b/htdocs/public/members/public_card.php
@@ -40,7 +40,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
-// TODO This should be useless. Because entity must be retrieve from object ref and not from url.
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php
index 1401d22b82a..1f2fcf4bac7 100644
--- a/htdocs/public/members/public_list.php
+++ b/htdocs/public/members/public_list.php
@@ -39,7 +39,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
-// TODO This should be useless. Because entity must be retrieve from object ref and not from url.
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/partnership/new.php b/htdocs/public/partnership/new.php
index 4b1a1420fae..9a1db3d88cc 100644
--- a/htdocs/public/partnership/new.php
+++ b/htdocs/public/partnership/new.php
@@ -45,7 +45,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
-// TODO This should be useless. Because entity must be retrieve from object ref and not from url.
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php
index ad4b0d1bdd8..79623a7d393 100644
--- a/htdocs/public/payment/newpayment.php
+++ b/htdocs/public/payment/newpayment.php
@@ -51,6 +51,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and get of entity must be done before including main.inc.php
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1))));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php
index 4e1b3825ca2..dcb89788136 100644
--- a/htdocs/public/payment/paymentko.php
+++ b/htdocs/public/payment/paymentko.php
@@ -40,7 +40,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and this test must be done before including main.inc.php
-// TODO This should be useless. Because entity must be retrieve from object ref and not from url.
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php
index 4a6c958ba9a..87c49592c93 100644
--- a/htdocs/public/payment/paymentok.php
+++ b/htdocs/public/payment/paymentok.php
@@ -44,7 +44,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
-// TODO This should be useless. Because entity must be retrieve from object ref and not from url.
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php
index 60c91239254..c7a33c386df 100644
--- a/htdocs/public/project/index.php
+++ b/htdocs/public/project/index.php
@@ -36,6 +36,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and get of entity must be done before including main.inc.php
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1))));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/project/new.php b/htdocs/public/project/new.php
index 284a6a5e93b..0b41a315145 100644
--- a/htdocs/public/project/new.php
+++ b/htdocs/public/project/new.php
@@ -44,6 +44,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php
index 005122121be..d5abd931716 100644
--- a/htdocs/public/project/suggestbooth.php
+++ b/htdocs/public/project/suggestbooth.php
@@ -38,7 +38,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
-// TODO This should be useless. Because entity must be retrieve from object ref and not from url.
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php
index c92edcb7973..063c0508d20 100644
--- a/htdocs/public/project/suggestconference.php
+++ b/htdocs/public/project/suggestconference.php
@@ -38,7 +38,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
-// TODO This should be useless. Because entity must be retrieve from object ref and not from url.
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php
index 90b56165cc2..7c088fa7249 100644
--- a/htdocs/public/project/viewandvote.php
+++ b/htdocs/public/project/viewandvote.php
@@ -36,6 +36,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and get of entity must be done before including main.inc.php
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1))));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php
index ed8dac838c5..0285d408390 100644
--- a/htdocs/public/stripe/ipn.php
+++ b/htdocs/public/stripe/ipn.php
@@ -31,6 +31,7 @@ if (!defined('NOBROWSERNOTIF')) {
define('NOBROWSERNOTIF', '1');
}
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
@@ -58,8 +59,8 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
// You can find your endpoint's secret in your webhook settings
-if (isset($_GET['connect'])) {
- if (isset($_GET['test'])) {
+if (GETPOSTISSET('connect')) {
+ if (GETPOSTISSET('test')) {
$endpoint_secret = getDolGlobalString('STRIPE_TEST_WEBHOOK_CONNECT_KEY');
$service = 'StripeTest';
$servicestatus = 0;
@@ -69,7 +70,7 @@ if (isset($_GET['connect'])) {
$servicestatus = 1;
}
} else {
- if (isset($_GET['test'])) {
+ if (GETPOSTISSET('test')) {
$endpoint_secret = getDolGlobalString('STRIPE_TEST_WEBHOOK_KEY');
$service = 'StripeTest';
$servicestatus = 0;
diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php
index 838052dac5b..e14597b9eee 100644
--- a/htdocs/public/test/test_arrays.php
+++ b/htdocs/public/test/test_arrays.php
@@ -53,7 +53,7 @@ if (empty($usedolheader)) {
- " />
+ " />
diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php
index 1a482944772..f7c408c07ed 100644
--- a/htdocs/public/ticket/create_ticket.php
+++ b/htdocs/public/ticket/create_ticket.php
@@ -45,6 +45,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/ticket/index.php b/htdocs/public/ticket/index.php
index 64a70c95c0d..860a82ec0ff 100644
--- a/htdocs/public/ticket/index.php
+++ b/htdocs/public/ticket/index.php
@@ -40,6 +40,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php
index 1842af349b4..aa6687371a9 100644
--- a/htdocs/public/ticket/list.php
+++ b/htdocs/public/ticket/list.php
@@ -38,6 +38,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/public/ticket/view.php b/htdocs/public/ticket/view.php
index a966813ca05..60a3c512969 100644
--- a/htdocs/public/ticket/view.php
+++ b/htdocs/public/ticket/view.php
@@ -40,6 +40,7 @@ if (!defined('NOBROWSERNOTIF')) {
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
+// Because 2 entities can have the same ref.
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php
index 2d1da5c8336..1fceafab74e 100644
--- a/htdocs/reception/card.php
+++ b/htdocs/reception/card.php
@@ -450,7 +450,7 @@ if (empty($reshook)) {
exit;
} else {
$db->rollback();
- $_GET["commande_id"] = GETPOSTINT('commande_id');
+ //$_GET["commande_id"] = GETPOSTINT('commande_id');
$action = 'create';
}
} elseif ($action == 'confirm_valid' && $confirm == 'yes' && $permissiontovalidate) {
diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php
index 5721ff01232..73020077bc5 100644
--- a/htdocs/reception/list.php
+++ b/htdocs/reception/list.php
@@ -571,8 +571,8 @@ if (empty($reshook)) {
$db->rollback();
$action = 'create';
- $_GET["origin"] = $_POST["origin"];
- $_GET["originid"] = $_POST["originid"];
+ $_GET["origin"] = $_POST["origin"]; // Keep this ?
+ $_GET["originid"] = $_POST["originid"]; // Keep this ?
setEventMessages($object->error, $errors, 'errors');
$error++;
}
diff --git a/htdocs/societe/ajax/company.php b/htdocs/societe/ajax/company.php
index 7505ea18ece..e0c5e1fe42d 100644
--- a/htdocs/societe/ajax/company.php
+++ b/htdocs/societe/ajax/company.php
@@ -74,7 +74,6 @@ restrictedArea($user, 'societe', $object->id, '&societe');
top_httphead('application/json');
//print ''."\n";
-//print_r($_GET);
if (!empty($action) && $action == 'fetch' && !empty($id)) {
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php
index 5125bfdc389..42820ce8369 100644
--- a/htdocs/societe/canvas/actions_card_common.class.php
+++ b/htdocs/societe/canvas/actions_card_common.class.php
@@ -93,19 +93,19 @@ abstract class ActionsCardCommon
$this->assign_post($action);
}
- if ($_GET["type"] == 'f') {
+ if (GETPOST("type") == 'f') {
$this->object->fournisseur = 1;
}
- if ($_GET["type"] == 'c') {
+ if (GETPOST("type") == 'c') {
$this->object->client = 1;
}
- if ($_GET["type"] == 'p') {
+ if (GETPOST("type") == 'p') {
$this->object->client = 2;
}
- if ($_GET["type"] == 'cp') {
+ if (GETPOST("type") == 'cp') {
$this->object->client = 3;
}
- if ($_REQUEST["private"] == 1) {
+ if (GETPOST("private") == 1) {
$this->object->particulier = 1;
}
diff --git a/htdocs/takepos/admin/other.php b/htdocs/takepos/admin/other.php
index 5e2af98b966..c8540ecb5e0 100644
--- a/htdocs/takepos/admin/other.php
+++ b/htdocs/takepos/admin/other.php
@@ -29,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
// If socid provided by ajax company selector
-if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id'])) {
- $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
- $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
- $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
+if (GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha')) {
+ $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ?
+ $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ?
+ $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ?
}
// Security check
diff --git a/htdocs/takepos/admin/printqr.php b/htdocs/takepos/admin/printqr.php
index 8d6a27faff0..4e130ff18cc 100644
--- a/htdocs/takepos/admin/printqr.php
+++ b/htdocs/takepos/admin/printqr.php
@@ -33,7 +33,7 @@ $langs->load("cashdesk");
$id = GETPOSTINT('id');
-$_GET['optioncss'] = "print";
+//$_GET['optioncss'] = "print";
print '
';
diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php
index 453d0115797..c94a0cc1db9 100644
--- a/htdocs/takepos/admin/setup.php
+++ b/htdocs/takepos/admin/setup.php
@@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
// If socid provided by ajax company selector
-if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id'])) {
+if (GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha')) {
$_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
$_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
$_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php
index f417c2a9988..b6b2b2857b7 100644
--- a/htdocs/takepos/admin/terminal.php
+++ b/htdocs/takepos/admin/terminal.php
@@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
$terminal = GETPOSTINT('terminal');
// If socid provided by ajax company selector
-if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY'.$terminal.'_id'])) {
+if (GETPOST('CASHDESK_ID_THIRDPARTY'.$terminal.'_id', 'alpha')) {
$_GET['CASHDESK_ID_THIRDPARTY'.$terminal] = GETPOST('CASHDESK_ID_THIRDPARTY'.$terminal.'_id', 'alpha');
$_POST['CASHDESK_ID_THIRDPARTY'.$terminal] = GETPOST('CASHDESK_ID_THIRDPARTY'.$terminal.'_id', 'alpha');
$_REQUEST['CASHDESK_ID_THIRDPARTY'.$terminal] = GETPOST('CASHDESK_ID_THIRDPARTY'.$terminal.'_id', 'alpha');
diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php
index b6433a6eac8..b042a7908c4 100644
--- a/htdocs/ticket/list.php
+++ b/htdocs/ticket/list.php
@@ -107,9 +107,9 @@ if (!$sortorder) {
$sortorder = "DESC";
}
-if (GETPOST('search_fk_status', 'alpha') == 'non_closed') {
+/*if (GETPOST('search_fk_status', 'alpha') == 'non_closed') {
$_GET['search_fk_statut'][] = 'openall'; // For backward compatibility
-}
+}*/
// Initialize array of search criteria
$search_all = (GETPOSTISSET("search_all") ? GETPOST("search_all", 'alpha') : GETPOST('sall'));
diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php
index c5b582cc254..6daec2a1569 100644
--- a/htdocs/viewimage.php
+++ b/htdocs/viewimage.php
@@ -55,6 +55,7 @@ if (!defined('NOREQUIREAJAX')) {
// Some value of modulepart can be used to get resources that are public so no login are required.
// Note that only directory logo is free to access without login.
$needlogin = 1;
+// Keep $_GET here, GETPOST is not available yet
if (isset($_GET["modulepart"])) {
// Some value of modulepart can be used to get resources that are public so no login are required.
@@ -129,9 +130,9 @@ require 'main.inc.php'; // Load $user and permissions
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$action = GETPOST('action', 'aZ09');
-$original_file = GETPOST('file', 'alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP).
-$hashp = GETPOST('hashp', 'aZ09', 1); // Must be read only by GET
-$modulepart = GETPOST('modulepart', 'alpha', 1); // Must be read only by GET
+$original_file = GETPOST('file', 'alphanohtml');
+$hashp = GETPOST('hashp', 'aZ09', 1);
+$modulepart = GETPOST('modulepart', 'alpha', 1);
$urlsource = GETPOST('urlsource', 'alpha');
$entity = (GETPOSTINT('entity') ? GETPOSTINT('entity') : $conf->entity);
diff --git a/htdocs/webportal/controllers/document.controller.class.php b/htdocs/webportal/controllers/document.controller.class.php
index d09b4dc5fb2..cf457c63ecf 100644
--- a/htdocs/webportal/controllers/document.controller.class.php
+++ b/htdocs/webportal/controllers/document.controller.class.php
@@ -110,7 +110,7 @@ class DocumentController extends Controller
if (preg_match('/\.(html|htm)$/i', $original_file)) {
$attachment = false;
}
- if (isset($_GET["attachment"])) {
+ if (GETPOSTISSET("attachment")) {
$attachment = GETPOST("attachment", 'alpha') ? true : false;
}
if (getDolGlobalString('MAIN_DISABLE_FORCE_SAVEAS')) {
diff --git a/htdocs/website/samples/wrapper.php b/htdocs/website/samples/wrapper.php
index e6f78442c1e..4e39f2bbbaa 100644
--- a/htdocs/website/samples/wrapper.php
+++ b/htdocs/website/samples/wrapper.php
@@ -62,7 +62,7 @@ $attachment = true;
if (preg_match('/\.(html|htm)$/i', $original_file)) {
$attachment = false;
}
-if (isset($_GET["attachment"])) {
+if (GETPOSTISSET("attachment")) {
$attachment = (GETPOST("attachment", 'alphanohtml') ? true : false);
}
if (getDolGlobalString('MAIN_DISABLE_FORCE_SAVEAS_WEBSITE')) {
@@ -183,13 +183,13 @@ if ($rss) {
if ($result >= 0) {
$attachment = false;
- if (isset($_GET["attachment"])) {
- $attachment = $_GET["attachment"];
+ if (GETPOSTISSET("attachment")) {
+ $attachment = GETPOST("attachment");
}
//$attachment = false;
$contenttype = 'application/rss+xml';
- if (isset($_GET["contenttype"])) {
- $contenttype = $_GET["contenttype"];
+ if (GETPOSTISSET("contenttype")) {
+ $contenttype = GETPOST("contenttype");
}
//$contenttype='text/plain';
$outputencoding = 'UTF-8';