Merge remote-tracking branch 'upstream/develop' into phpstan_user

This commit is contained in:
Frédéric France 2024-03-28 20:26:57 +01:00
commit a3df8248a7
No known key found for this signature in database
GPG key ID: CE25B0B7B53B9177
101 changed files with 196 additions and 272 deletions

View file

@ -3,7 +3,7 @@
// Page created by Shepard [Fabian Pijcke] <Shepard8@laposte.net>
// Arno Esterhuizen <arno.esterhuizen@gmail.com>
// and Romain Bourdon <romain@anaska.com>
//
//
// icones by Mark James <http://www.famfamfam.com/lab/icons/silk/>
//
// Modified from WampServer project by Laurent Destailleur (NLTechno)
@ -260,7 +260,7 @@ if (isset($_GET['askhelp']))
// Show PHPInfo
if (isset($_GET['phpinfo']))
{
phpinfo();
phpinfo(INFO_GENERAL|INFO_MODULES);
exit();
}
@ -274,27 +274,27 @@ if (isset($_GET['img']))
header("Content-type: image/png");
echo base64_decode($pngFolder);
exit();
case 'pngFolderGo' :
header("Content-type: image/png");
echo base64_decode($pngFolderGo);
exit();
case 'pngLogo' :
header("Content-type: image/png");
echo base64_decode($pngLogo);
exit();
case 'pngPlugin' :
header("Content-type: image/png");
echo base64_decode($pngPlugin);
exit();
case 'pngWrench' :
header("Content-type: image/png");
echo base64_decode($pngWrench);
exit();
case 'favicon' :
header("Content-type: image/x-icon");
echo base64_decode($favicon);
@ -324,7 +324,7 @@ foreach ($loaded_extensions as $extension) {
$phpExtContents .= "<li>${extension}</li>";
}
// Read alias directory
$listoffile=array();
$aliasarray=array();
@ -337,10 +337,10 @@ if (is_dir($aliasDir)) {
}
}
sort($listoffiles);
foreach($listoffiles as $file) {
if (is_file($aliasDir.$file) && preg_match('/\.conf/',$file))
{
{
$msg = '';
$aliasContents.='<tr><td><ul class="aliases">';
@ -350,7 +350,7 @@ if (is_dir($aliasDir)) {
if (preg_match('/dolibarr/i',$file)) $aliasContents .= $file.'</a></li></ul></td><td>http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/</td><td>http://<i>ipofyourserver</i>'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/</td></tr>';
elseif (preg_match('/phpmyadmin/i',$file)) $aliasContents .= $file.'</a></li></ul></td><td>http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/</td><td>'.$langues[$langue]['NotAvailable'].'</td></tr>';
else $aliasContents .= $file.'</a></li></ul></td> <td> </td><td>'.$langues[$langue]['NotAvailable'].'</td></tr>';
$aliasarray[]=$file;
}
}
@ -358,13 +358,13 @@ if (is_dir($aliasDir)) {
}
if (!isset($aliasContents))
$aliasContents = '<tr><td colspan="3">'.$langues[$langue]['txtNoAlias'].'</td></tr>';
// Read projects in www dir
$listoffiles=array();
$handle=opendir(".");
if (is_resource($handle)) {
while ($file = readdir($handle))
while ($file = readdir($handle))
{
$listoffiles[]=$file;
}
@ -372,14 +372,14 @@ if (is_resource($handle)) {
}
foreach($listoffiles as $file) {
if (is_dir($file) && !in_array($file,$projectsListIgnore) && !in_array($file,$aliasarray))
{
if (is_dir($file) && !in_array($file,$projectsListIgnore) && !in_array($file,$aliasarray))
{
$projectContents .= '<tr><td><ul class="projects">';
$projectContents .= '<li><a href="'.$file.'/">';
$projectContents .= $file.'</a>';
$projectContents .= '</li>';
$projectContents .= '</ul></td><td>http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/)'.'</td><td>'.$langues[$langue]['NotAvailable'].'</td></tr>';
}
}
@ -509,7 +509,7 @@ a:hover {
font-size: 0.85em;
}
</style>
<link rel="shortcut icon" href="index.php?img=favicon" type="image/ico" />
</head>
@ -533,7 +533,7 @@ a:hover {
<dd>${apacheVersion} &nbsp;</dd>
<dt>{$langues[$langue]['versp']}</dt>
<dd>${phpVersion} &nbsp;</dd>
<dt>{$langues[$langue]['phpExt']}</dt>
<dt>{$langues[$langue]['phpExt']}</dt>
<dd>
<ul>
${phpExtContents}
@ -554,8 +554,8 @@ a:hover {
</td><td valign="middle">
{$langues[$langue]['FromInternet']}
</td></tr>
${aliasContents}
${projectContents}
${aliasContents}
${projectContents}
</table>
<h2>{$langues[$langue]['titrePage']}</h2>

View file

@ -281,8 +281,8 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
}
if ($action == 'addthumb' || $action == 'addthumbsquarred') { // Regenerate thumbs
if (file_exists($conf->mycompany->dir_output.'/logos/'.$_GET["file"])) {
$isimage = image_format_supported($_GET["file"]);
if (file_exists($conf->mycompany->dir_output.'/logos/'.GETPOST("file"))) {
$isimage = image_format_supported(GETPOST("file"));
// Create thumbs of logo
if ($isimage > 0) {
@ -297,7 +297,7 @@ if ($action == 'addthumb' || $action == 'addthumbsquarred') { // Regenerate thu
//$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retrieve value with get...
// Create small thumb. Used on logon for example
$imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthsmall, $maxheightsmall, '_small', $quality);
$imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.GETPOST("file"), $maxwidthsmall, $maxheightsmall, '_small', $quality);
if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbSmall, $reg)) {
$imgThumbSmall = $reg[1]; // Save only basename
dolibarr_set_const($db, $constant."_SMALL", $imgThumbSmall, 'chaine', 0, '', $conf->entity);
@ -306,7 +306,7 @@ if ($action == 'addthumb' || $action == 'addthumbsquarred') { // Regenerate thu
}
// Create mini thumbs. Used on menu or for setup page for example
$imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthmini, $maxheightmini, '_mini', $quality);
$imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.GETPOST("file"), $maxwidthmini, $maxheightmini, '_mini', $quality);
if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbMini, $reg)) {
$imgThumbMini = $reg[1]; // Save only basename
dolibarr_set_const($db, $constant."_MINI", $imgThumbMini, 'chaine', 0, '', $conf->entity);

View file

@ -293,7 +293,7 @@ show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass);
if (function_exists("ldap_connect")) {
if ($_GET["action"] == 'test') {
if ($action == 'test') {
// Create object
$object = new Contact($db);
$object->initAsSpecimen();

View file

@ -444,7 +444,7 @@ if (getDolGlobalString('LDAP_MEMBER_ACTIVE')) {
}
if (function_exists("ldap_connect")) {
if ($_GET["action"] == 'testmember') {
if ($action == 'testmember') {
// Create object
$object = new Adherent($db);
$object->initAsSpecimen();

View file

@ -200,7 +200,7 @@ if (getDolGlobalInt('LDAP_MEMBER_TYPE_ACTIVE') === Ldap::SYNCHRO_DOLIBARR_TO_LDA
}
if (function_exists("ldap_connect")) {
if ($_GET["action"] == 'testmembertype') {
if ($action == 'testmembertype') {
// Create object
$object = new AdherentType($db);
$object->initAsSpecimen();

View file

@ -80,7 +80,7 @@ if ($action == 'update' || $action == 'add') {
// Action to activate a submodule of the 'adherent' module
if ($action == 'set') {
$result = dolibarr_set_const($db, $_GET["name"], $_GET["value"], '', 0, '', $conf->entity);
$result = dolibarr_set_const($db, GETPOST("name", 'aZ09'), GETPOST("value"), '', 0, '', $conf->entity);
if ($result < 0) {
dol_print_error($db);
}
@ -88,7 +88,7 @@ if ($action == 'set') {
// Action to deactivate a submodule of the 'adherent' module
if ($action == 'unset') {
$result = dolibarr_del_const($db, $_GET["name"], $conf->entity);
$result = dolibarr_del_const($db, GETPOST("name", 'aZ09'), $conf->entity);
if ($result < 0) {
dol_print_error($db);
}

View file

@ -30,7 +30,7 @@
* \brief Page to activate/disable all modules
*/
if (!defined('CSRFCHECK_WITH_TOKEN') && (empty($_GET['action']) || $_GET['action'] != 'reset')) { // We force security except to disable modules so we can do it if problem of a module
if (!defined('CSRFCHECK_WITH_TOKEN') && (empty($_GET['action']) || $_GET['action'] != 'reset')) { // We force security except to disable modules so we can do it if a problem occurs on a module
define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET
}

View file

@ -82,7 +82,7 @@ if ($action == 'update' || $action == 'add') {
// Action activation d'un sous module du module adherent
if ($action == 'set') {
$result = dolibarr_set_const($db, $_GET["name"], $_GET["value"], '', 0, '', $conf->entity);
$result = dolibarr_set_const($db, GETPOST("name", 'aZ09'), GETPOST("value"), '', 0, '', $conf->entity);
if ($result < 0) {
dol_print_error($db);
}
@ -90,7 +90,7 @@ if ($action == 'set') {
// Action deactivation d'un sous module du module adherent
if ($action == 'unset') {
$result = dolibarr_del_const($db, $_GET["name"], $conf->entity);
$result = dolibarr_del_const($db, GETPOST("name", 'aZ09'), $conf->entity);
if ($result < 0) {
dol_print_error($db);
}

View file

@ -115,7 +115,7 @@ if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) {
print '</td></tr>';
print '<tr><td>GET and POST support</td><td>';
if (!isset($_GET["testget"]) && !isset($_POST["testpost"]) && !isset($_GET["mainmenu"])) { // We must keep $_GET and $_POST here
if (!isset($_GET["testget"]) && !isset($_POST["testpost"]) && !isset($_GET["mainmenu"])) { // We must keep $_GET and $_POST here. This is a specific test.
print '<img src="'.$WarningPicturePath.'" alt="Warning"> '.$langs->trans("PHPSupportPOSTGETKo");
print ' (<a href="'.$_SERVER["PHP_SELF"].'?testget=ok">'.$langs->trans("Recheck").'</a>)';
} else {

View file

@ -166,7 +166,7 @@ if (in_array($type, array('mysql', 'mysqli'))) {
print '<textarea rows="1" id="restorecommand" class="centpercent">'.$langs->trans("ImportMySqlCommand", $command, ($showpass ? $paramclear : $paramcrypted)).'</textarea><br>';
print ajax_autoselect('restorecommand');
if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) {
if (!GETPOST("showpass") && $dolibarr_main_db_pass) {
print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=1&amp;radio_dump=mysql_options">'.$langs->trans("UnHidePassword").'</a>';
}
//else print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=0&amp;radio_dump=mysql_options">'.$langs->trans("HidePassword").'</a>';
@ -205,8 +205,6 @@ if (in_array($type, array('mysql', 'mysqli'))) {
print '<br>';
print '<textarea rows="1" id="restorecommand" class="centpercent">'.$langs->trans("ImportPostgreSqlCommand", $command, ($showpass ? $paramclear : $paramcrypted)).'</textarea><br>';
print ajax_autoselect('restorecommand');
//if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=1&amp;radio_dump=postgresql_options">'.$langs->trans("UnHidePassword").'</a>';
//else print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=0&amp;radio_dump=mysql_options">'.$langs->trans("HidePassword").'</a>';
print '</div>';
print '<br>';

View file

@ -300,11 +300,6 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
$db->rollback();
}
}
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
}
if (GETPOST('actioncancel', 'alpha')) {
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
}
if ($action == 'confirm_delete' && $confirm == 'yes') { // delete

View file

@ -106,7 +106,7 @@ class DolibarrApiAccess implements iAuthenticate
// api key can be provided in url with parameter api_key=xxx or ni header with header DOLAPIKEY:xxx
$api_key = '';
if (isset($_GET['api_key'])) { // For backward compatibility
if (isset($_GET['api_key'])) { // For backward compatibility. Keep $_GET here.
// TODO Add option to disable use of api key on url. Return errors if used.
$api_key = $_GET['api_key'];
}

View file

@ -29,7 +29,7 @@
*/
function printDropdownBookmarksList()
{
global $conf, $user, $db, $langs, $sortfield, $sortorder;
global $user, $db, $langs, $sortfield, $sortorder;
require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
@ -40,7 +40,7 @@ function printDropdownBookmarksList()
$url = $_SERVER["PHP_SELF"];
$url_param = array();
if (!empty($_SERVER["QUERY_STRING"])) {
if (is_array($_GET)) {
if (is_array($_GET)) { // Parse the original GET URL. So we must keep $_GET here.
foreach ($_GET as $key => $val) {
if (is_array($val)) {
foreach ($val as $tmpsubval) {

View file

@ -95,12 +95,12 @@ if (empty($reshook)) {
}
}
if ($action == 'confirm_delete' && $_GET["file"] && $confirm == 'yes' && $user->hasRight('categorie', 'creer')) {
$object->delete_photo($upload_dir."/".$_GET["file"]);
if ($action == 'confirm_delete' && GETPOST("file") && $confirm == 'yes' && $user->hasRight('categorie', 'creer')) {
$object->delete_photo($upload_dir."/".GETPOST("file"));
}
if ($action == 'addthumb' && $_GET["file"]) {
$object->addThumbs($upload_dir."/".$_GET["file"]);
if ($action == 'addthumb' && GETPOST("file")) {
$object->addThumbs($upload_dir."/".GETPOST("file"));
}
}
@ -133,10 +133,10 @@ if ($object->id) {
dol_banner_tab($object, 'label', $linkback, ($user->socid ? 0 : 1), 'label', 'label', $morehtmlref, '&type='.$type, 0, '', '', 1);
/*
* Confirmation de la suppression de photo
*/
* Confirmation deletion of picture
*/
if ($action == 'delete') {
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.urlencode($type).'&file='.urlencode(GETPOST("file")), $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
}
print '<br>';

View file

@ -52,7 +52,6 @@ if ($user->socid) {
$socid = $user->socid;
}
if ($user->socid > 0) {
unset($_GET["action"]);
$action = '';
}

View file

@ -972,7 +972,7 @@ if ($action == 'create') {
if (getDolGlobalString('MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS')) {
setEventMessages($langs->trans("MailSendSetupIs3", getDolGlobalString('MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS')), null, 'warnings');
}
$_GET["action"] = '';
$action = '';
} elseif (getDolGlobalInt('MAILING_LIMIT_SENDBYWEB') < 0) {
if (getDolGlobalString('MAILING_LIMIT_WARNING_PHPMAIL') && $sendingmode == 'mail') {
setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_PHPMAIL), null, 'warnings');
@ -987,7 +987,7 @@ if ($action == 'create') {
if ($conf->file->mailing_limit_sendbyweb != '-1') { // MAILING_LIMIT_SENDBYWEB was set to -1 in database, but it is allowed to increase it.
setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); // You can send online with constant...
}
$_GET["action"] = '';
$action = '';
} else {
if (getDolGlobalString('MAILING_LIMIT_WARNING_PHPMAIL') && $sendingmode == 'mail') {
setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_PHPMAIL), null, 'warnings');

View file

@ -682,8 +682,8 @@ if (empty($reshook)) {
$db->rollback();
$action = 'create';
$_GET["origin"] = $_POST["origin"];
$_GET["originid"] = $_POST["originid"];
$_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ?
$_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ?
if (!empty($errors)) {
setEventMessages(null, $errors, 'errors');
} else {

View file

@ -27,7 +27,7 @@
* \brief Page to show portoflio and files of a thirdparty and download it
*/
if ((array_key_exists('action', $_GET) && $_GET['action'] == 'dl') || (array_key_exists('action', $_POST) && $_POST['action'] == 'dl')) { // To not replace token when downloading file
if ((array_key_exists('action', $_GET) && $_GET['action'] == 'dl') || (array_key_exists('action', $_POST) && $_POST['action'] == 'dl')) { // To not replace token when downloading file. Keep $_GET and $_POST here
if (!defined('NOTOKENRENEWAL')) {
define('NOTOKENRENEWAL', '1');
}

View file

@ -69,7 +69,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$hookmanager->initHooks(array('bankcard', 'globalcard'));
// Security check
$id = GETPOSTINT("id") ? GETPOSTINT("id") : GETPOSTINT('ref');
$id = GETPOSTINT("id") ? GETPOSTINT("id") : GETPOST('ref');
$fieldid = GETPOSTINT("id") ? 'rowid' : 'ref';
if (GETPOSTINT("id") || GETPOST("ref")) {
@ -319,11 +319,11 @@ if (empty($reshook)) {
$categories = GETPOST('categories', 'array');
$object->setCategories($categories);
$_GET["id"] = GETPOSTINT("id"); // Force chargement page en mode visu
$id = GETPOSTINT("id"); // Force load of this page
} else {
$error++;
setEventMessages($object->error, $object->errors, 'errors');
$action = 'edit'; // Force chargement page edition
$action = 'edit'; // Force load of page in edit mode
}
}

View file

@ -85,7 +85,7 @@ if (GETPOST("account") || GETPOST("ref")) {
}
if (GETPOST("ref")) {
$result = $object->fetch(0, GETPOST("ref"));
$_GET["account"] = $object->id;
$id = $object->id;
}
$title = $object->ref.' - '.$langs->trans("PlannedTransactions");

View file

@ -66,7 +66,7 @@ if (!$sortorder) {
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'thirdpartylist';
if ($contextpage == 'takepos') {
$_GET['optioncss'] = 'print';
$optioncss = 'print';
}
$arrayofpaymentmode = array('cash' => 'Cash', 'cheque' => 'Cheque', 'card' => 'CreditCard');

View file

@ -37,7 +37,7 @@ if (!defined('NOBROWSERNOTIF')) {
define('NOBROWSERNOTIF', '1'); // Disable browser notification
}
$_GET['optioncss'] = "print";
$optioncss = "print";
// Load Dolibarr environment
require '../../main.inc.php';

View file

@ -151,16 +151,16 @@ if ($resql) {
print '<tr class="liste_titre">';
print '<td class="liste_titre left">';
print '<input class="flat" type="text" name="search_nom" value="'.$_GET["search_nom"].'"></td>';
print '<input class="flat" type="text" name="search_nom" value="'.GETPOST("search_nom").'"></td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre left">';
print '<input class="flat" type="text" size="10" name="search_code_client" value="'.$_GET["search_code_client"].'">';
print '<input class="flat" type="text" size="10" name="search_code_client" value="'.GETPOST("search_code_client").'">';
print '</td>';
print '<td class="liste_titre left">';
print '<input class="flat" type="text" size="10" name="search_compta" value="'.$_GET["search_compta"].'">';
print '<input class="flat" type="text" size="10" name="search_compta" value="'.GETPOST("search_compta").'">';
print '</td>';
print '<td colspan="2" class="liste_titre right">';

View file

@ -2080,8 +2080,8 @@ if (empty($reshook)) {
} else {
$db->rollback();
$action = 'create';
$_GET["origin"] = $_POST["origin"];
$_GET["originid"] = $_POST["originid"];
$_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ?
$_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ?
setEventMessages($object->error, $object->errors, 'errors');
}
} elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha') !== '') {

View file

@ -87,7 +87,7 @@ if ($action == 'add' && !$cancel) {
} else {
$db->rollback();
setEventMessages($object->error, $object->errors, 'errors');
$_GET["action"] = "create";
$action = "create";
}
}

View file

@ -245,7 +245,7 @@ print '<div class="tabsAction">';
/*
if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
{
if ($user->socid == 0 && $object->statut == 0 && $_GET['action'] == '')
if ($user->socid == 0 && $object->statut == 0 && $action == '')
{
if ($user->hasRight('facture', 'paiement')){
print '<a class="butAction" href="card.php?id='.GETPOST('id', 'int').'&amp;facid='.$objp->facid.'&amp;action=valide">'.$langs->trans('Valid').'</a>';

View file

@ -150,17 +150,6 @@ if ($action == 'delete') {
print $form->formconfirm('card.php?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete', '', 0, 2);
}
/*
* Validation confirmation of payment
*/
/*
if ($action == 'valide')
{
$facid = $_GET['facid'];
print $form->formconfirm('card.php?id='.$object->id.'&amp;facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
}
*/
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/tva/payments.php">'.$langs->trans("BackToList").'</a>';
@ -283,18 +272,6 @@ if ($resql) {
*/
print '<div class="tabsAction">';
/*
if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
{
if ($user->socid == 0 && $object->statut == 0 && $_GET['action'] == '')
{
if ($user->hasRight('facture', 'paiement')) {
print '<a class="butAction" href="card.php?id='.GETPOST('id', 'int').'&amp;facid='.$objp->facid.'&amp;action=valide">'.$langs->trans('Valid').'</a>';
}
}
}
*/
if ($action == '') {
if ($user->hasRight('tax', 'charges', 'supprimer')) {
if (!$disable_delete) {

View file

@ -57,7 +57,7 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'co
$mode = GETPOST('mode', 'alpha');
if ($contextpage == 'poslist') {
$_GET['optioncss'] = 'print';
$optioncss = 'print';
}
// Security check

View file

@ -707,7 +707,7 @@ if (empty($reshook)) {
if (!empty($date_start_update) && !empty($date_end_update) && $date_start_update > $date_end_update) {
setEventMessages($langs->trans("Error").': '.$langs->trans("DateStartPlanned").' > '.$langs->trans("DateEndPlanned"), null, 'errors');
$action = 'editline';
$_GET['rowid'] = GETPOST('elrowid');
$_GET['rowid'] = GETPOST('elrowid'); // Keep $_GET here. Used by GETPOST('rowid') later
$error++;
}

View file

@ -47,7 +47,6 @@ $ref = GETPOST('ref', 'alpha');
// Security check
if ($user->socid > 0) {
unset($_GET["action"]);
$action = '';
$socid = $user->socid;
}

View file

@ -119,7 +119,7 @@ if (GETPOST('sendit', 'alpha') && getDolGlobalString('MAIN_UPLOAD_DOC') && !empt
// Delete file/link
if ($action == 'confirm_deletefile' && $confirm == 'yes' && !empty($permissiontoadd)) {
$urlfile = GETPOST('urlfile', 'alpha', 0, null, null, 1); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
$urlfile = GETPOST('urlfile', 'alpha', 0, null, null, 1);
if (GETPOST('section', 'alpha')) {
// For a delete from the ECM module, upload_dir is ECM root dir and urlfile contains relative path from upload_dir
$file = $upload_dir.(preg_match('/\/$/', $upload_dir) ? '' : '/').$urlfile;

View file

@ -35,8 +35,8 @@ if (!defined('NOREQUIRESOC')) {
if (!defined('NOREQUIREMENU')) {
define('NOREQUIREMENU', '1');
}
// If there is no need to load and show top and left menu
if (!empty($_GET['public'])) { // GETPOST() is not yet defined so we use $_GET
// If we need access without being logged.
if (!empty($_GET['public'])) { // Keep $_GET here. GETPOST() is not yet defined so we use $_GET
if (!defined("NOLOGIN")) {
define("NOLOGIN", '1');
}

View file

@ -74,8 +74,6 @@ if (!empty($conf->$module->dir_temp)) {
top_httphead();
dol_syslog(implode(',', $_GET));
$result = false;
if (!empty($upload_dir)) {

View file

@ -63,8 +63,7 @@ top_httphead();
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
dol_syslog('location_incoterms call with MAIN_USE_LOCATION_INCOTERMS_DICTIONNARY='.(!getDolGlobalString('MAIN_USE_LOCATION_INCOTERMS_DICTIONNARY') ? '' : $conf->global->MAIN_USE_LOCATION_INCOTERMS_DICTIONNARY));
//var_dump($_GET);
dol_syslog('location_incoterms call with MAIN_USE_LOCATION_INCOTERMS_DICTIONNARY='.getDolGlobalString('MAIN_USE_LOCATION_INCOTERMS_DICTIONNARY', ''));
// Generation of list of zip-town
if (GETPOST('location_incoterms')) {

View file

@ -48,7 +48,7 @@ if (!defined('NOIPCHECK')) {
if (!defined('NOBROWSERNOTIF')) {
define('NOBROWSERNOTIF', '1');
}
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); // Keep $_GET and $_POST here. GETPOST not yet defined.
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
}

View file

@ -149,7 +149,6 @@ $form = new Form($db);
top_httphead($outjson ? 'application/json' : 'text/html');
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
//print_r($_GET);
$arrayresult = $form->selectForFormsList($objecttmp, $htmlname, '', 0, $searchkey, '', '', '', 0, 1, 0, '', $filter);

View file

@ -57,7 +57,6 @@ if (!getDolGlobalString('MAIN_USE_ZIPTOWN_DICTIONNARY')) {
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
dol_syslog('ziptown call with MAIN_USE_ZIPTOWN_DICTIONNARY='.getDolGlobalString('MAIN_USE_ZIPTOWN_DICTIONNARY'));
//var_dump($_GET);
// Generation of list of zip-town
if (GETPOST('zipcode') || GETPOST('town')) {

View file

@ -432,26 +432,24 @@ class SimpleOpenID
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* ValidateWithServer
* validateWithServer
*
* @return boolean
*/
public function ValidateWithServer()
public function validateWithServer()
{
// phpcs:enable
$params = array(
'openid.assoc_handle' => urlencode($_GET['openid_assoc_handle']),
'openid.signed' => urlencode($_GET['openid_signed']),
'openid.sig' => urlencode($_GET['openid_sig'])
'openid.assoc_handle' => urlencode(GETPOST('openid_assoc_handle')),
'openid.signed' => urlencode(GETPOST('openid_signed')),
'openid.sig' => urlencode(GETPOST('openid_sig'))
);
// Send only required parameters to confirm validity
$arr_signed = explode(",", str_replace('sreg.', 'sreg_', $_GET['openid_signed']));
$arr_signed = explode(",", str_replace('sreg.', 'sreg_', GETPOST('openid_signed')));
$num = count($arr_signed);
for ($i = 0; $i < $num; $i++) {
$s = str_replace('sreg_', 'sreg.', $arr_signed[$i]);
$c = $_GET['openid_'.$arr_signed[$i]];
$c = GETPOST('openid_'.$arr_signed[$i]);
// if ($c != ""){
$params['openid.'.$s] = urlencode($c);
// }

View file

@ -108,10 +108,10 @@ print '<body>'."\n";
$qualified = true;
// TODO Replace with GETPOST
if (!isset($_GET["sd"])) {
$_GET["sd"] = "00000000";
}
if (!isset($_GET["m"]) || !isset($_GET["y"])) {
$qualified = false;
}
@ -126,7 +126,6 @@ if (isset($_GET["m"]) && isset($_GET["y"])) {
// If parameters provided, we show calendar
if ($qualified) {
//print $_GET["cm"].",".$_GET["sd"].",".$_GET["m"].",".$_GET["y"];exit;
displayBox(GETPOSTINT("sd"), GETPOSTINT("m"), GETPOSTINT("y"));
} else {
dol_print_error(null, 'ErrorBadParameters');

View file

@ -243,14 +243,11 @@ function GetFoldersAndFiles($resourceType, $currentFolder)
*/
function CreateFolder($resourceType, $currentFolder)
{
if (!isset($_GET)) {
global $_GET;
}
$sErrorNumber = '0';
$sErrorMsg = '';
if (isset($_GET['NewFolderName'])) {
$sNewFolderName = $_GET['NewFolderName'];
$sNewFolderName = GETPOST('NewFolderName');
$sNewFolderName = SanitizeFolderName($sNewFolderName);
if (strpos($sNewFolderName, '..') !== false) {
@ -741,9 +738,6 @@ function IsAllowedCommand($sCommand)
*/
function GetCurrentFolder()
{
if (!isset($_GET)) {
global $_GET;
}
$sCurrentFolder = isset($_GET['CurrentFolder']) ? GETPOST('CurrentFolder', '', 1) : '/';
// Check the current folder syntax (must begin and start with a slash).

View file

@ -40,16 +40,13 @@ DoResponse();
*/
function DoResponse()
{
if (!isset($_GET)) {
global $_GET;
}
if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
return;
}
// Get the main request information.
$sCommand = $_GET['Command'];
$sResourceType = $_GET['Type'];
$sCommand = GETPOST('Command');
$sResourceType = GETPOST('Type');
$sCurrentFolder = GetCurrentFolder();
// Check if it is an allowed command

View file

@ -2036,7 +2036,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename =
//TODO: Remove this. MAIN_ENABLE_LOG_INLINE_HTML should be deprecated and use a log handler dedicated to HTML output
// If html log tag enabled and url parameter log defined, we show output log on HTML comments
if (getDolGlobalString('MAIN_ENABLE_LOG_INLINE_HTML') && !empty($_GET["log"])) {
if (getDolGlobalString('MAIN_ENABLE_LOG_INLINE_HTML') && GETPOSTINT("log")) {
print "\n\n<!-- Log start\n";
print dol_escape_htmltag($message)."\n";
print "Log end -->\n";

View file

@ -39,7 +39,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/openid.class.php';
*/
function check_user_password_openid($usertotest, $passwordtotest, $entitytotest)
{
global $db, $conf, $langs;
global $db, $conf;
dol_syslog("functions_openid::check_user_password_openid usertotest=".$usertotest);
@ -62,11 +62,11 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest)
return false;
}
return false;
} elseif ($_GET['openid_mode'] == 'id_res') {
} elseif (GETPOST('openid_mode') == 'id_res') {
// Perform HTTP Request to OpenID server to validate key
$openid = new SimpleOpenID();
$openid->SetIdentity(GETPOST('openid_identity'));
$openid_validation_result = $openid->ValidateWithServer();
$openid_validation_result = $openid->validateWithServer();
if ($openid_validation_result === true) {
// OK HERE KEY IS VALID
@ -93,7 +93,7 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest)
//echo "INVALID AUTHORIZATION";
return false;
}
} elseif ($_GET['openid_mode'] == 'cancel') {
} elseif (GETPOST('openid_mode') == 'cancel') {
// User Canceled your Request
//echo "USER CANCELED REQUEST";
return false;

View file

@ -135,7 +135,6 @@ class modPhpbarcode extends ModeleBarCode
*/
public function buildBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0)
{
global $_GET, $_SERVER;
global $conf;
global $genbarcode_loc, $bar_color, $bg_color, $text_color, $font_loc;

View file

@ -106,8 +106,6 @@ class modTcpdfbarcode extends ModeleBarCode
*/
public function buildBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0)
{
global $_GET;
$tcpdfEncoding = $this->getTcpdfEncodingType($encoding);
if (empty($tcpdfEncoding)) {
return -1;

View file

@ -404,7 +404,7 @@ if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex")
}
} else {
setEventMessages($result, null, 'errors');
$_GET['file'] = $_POST["file"];
//$_GET['file'] = $_POST["file"];
$action = '';
}
}
@ -467,7 +467,7 @@ if ($action == 'confirm_crop') {
}
} else {
setEventMessages($result, null, 'errors');
$_GET['file'] = $_POST["file"];
//$_GET['file'] = $_POST["file"];
$action = '';
}
}

View file

@ -62,7 +62,7 @@ if (!isset($section)) {
// Confirm remove file (for non javascript users)
if (($action == 'delete' || $action == 'file_manager_delete') && empty($conf->use_javascript_ajax)) {
// TODO Add website, pageid, filemanager if defined
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', '', 1);
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', '', 1);
}
// Start container of all panels

View file

@ -61,6 +61,7 @@ if (isset($_GET["hashp"]) && !defined("NOLOGIN")) {
}
}
// Some value of modulepart can be used to get resources that are public so no login are required.
// Keep $_GET here, GETPOST is not available yet
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias')) {
if (!defined("NOLOGIN")) {
define("NOLOGIN", 1);
@ -98,7 +99,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
$encoding = '';
$action = GETPOST('action', 'aZ09');
$original_file = GETPOST('file', 'alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP).
$original_file = GETPOST('file', 'alphanohtml');
$hashp = GETPOST('hashp', 'aZ09');
$modulepart = GETPOST('modulepart', 'alpha');
$urlsource = GETPOST('urlsource', 'alpha');

View file

@ -139,7 +139,7 @@ if (GETPOST("sendit") && getDolGlobalString('MAIN_UPLOAD_DOC') && $permissiontou
// Remove file
if ($action == 'confirm_deletefile' && $confirm == 'yes' && $permissiontoupload) {
$langs->load("other");
$file = $upload_dir."/".GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
$file = $upload_dir."/".GETPOST('urlfile'); // Do not use urldecode here
$ret = dol_delete_file($file);
if ($ret) {
setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');

View file

@ -137,7 +137,7 @@ if ($action == 'confirm_deletefile') {
$relativepath = '';
}
$upload_dir = $conf->ecm->dir_output.($relativepath ? '/'.$relativepath : '');
$file = $upload_dir."/".GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_POST are already decoded by PHP).
$file = $upload_dir."/".GETPOST('urlfile');
$ret = dol_delete_file($file);
if ($ret) {
@ -417,7 +417,7 @@ print dol_get_fiche_head($head, 'index_auto', '', -1, '');
// Confirm remove file (for non javascript users)
if ($action == 'deletefile' && empty($conf->use_javascript_ajax)) {
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', '', 1);
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', '', 1);
}
// Start container of all panels

View file

@ -444,7 +444,7 @@ if (empty($reshook)) {
exit;
} else {
$db->rollback();
$_GET["commande_id"] = GETPOSTINT('commande_id');
//$_GET["commande_id"] = GETPOSTINT('commande_id');
$action = 'create';
}
} elseif ($action == 'create_delivery' && getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && $user->hasRight('expedition', 'delivery', 'creer')) {

View file

@ -219,11 +219,11 @@ if ($action == 'selectfield') { // Selection of field at step 2
}
}
if ($action == 'unselectfield') {
if ($_GET["field"] == 'all') {
if (GETPOST("field") == 'all') {
$array_selected = array();
$_SESSION["export_selected_fields"] = $array_selected;
} else {
unset($array_selected[$_GET["field"]]);
unset($array_selected[GETPOST("field")]);
// Renumber fields of array_selected (from 1 to nb_elements)
asort($array_selected);
$i = 0;
@ -238,7 +238,7 @@ if ($action == 'unselectfield') {
}
if ($action == 'downfield' || $action == 'upfield') {
$pos = $array_selected[$_GET["field"]];
$pos = $array_selected[GETPOST("field")];
if ($action == 'downfield') {
$newpos = $pos + 1;
}
@ -253,9 +253,9 @@ if ($action == 'downfield' || $action == 'upfield') {
break;
}
}
//print("Switch pos=$pos (code=".$_GET["field"].") and newpos=$newpos (code=$newcode)");
//print("Switch pos=$pos (code=".GETPOST("field").") and newpos=$newpos (code=$newcode)");
if ($newcode) { // Si newcode trouve (protection contre resoumission de page)
$array_selected[$_GET["field"]] = $newpos;
$array_selected[GETPOST("field")] = $newpos;
$array_selected[$newcode] = $pos;
$_SESSION["export_selected_fields"] = $array_selected;
}
@ -290,7 +290,7 @@ if ($action == 'builddoc') {
// Delete file
if ($step == 5 && $action == 'confirm_deletefile' && $confirm == 'yes') {
$file = $upload_dir."/".GETPOST('file'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
$file = $upload_dir."/".GETPOST('file');
$ret = dol_delete_file($file);
if ($ret) {

View file

@ -1420,7 +1420,7 @@ if (empty($reshook)) {
$langs->load("errors");
$db->rollback();
$action = 'create';
$_GET['socid'] = $_POST['socid'];
//$_GET['socid'] = $_POST['socid'];
} else {
$db->commit();
header("Location: ".$_SERVER['PHP_SELF']."?id=".urlencode((string) ($id)));

View file

@ -730,8 +730,8 @@ if (empty($reshook)) {
} else {
$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("Error", null, 'errors');
$error++;
}

View file

@ -801,7 +801,7 @@ if (empty($reshook)) {
if (empty($dateinvoice)) {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('DateInvoice')), null, 'errors');
$action = 'create';
$_GET['socid'] = $_POST['socid'];
//$_GET['socid'] = $_POST['socid'];
$error++;
} elseif ($dateinvoice > (dol_get_last_hour(dol_now('tzuserrel')) + (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY') ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) {
$error++;
@ -867,7 +867,7 @@ if (empty($reshook)) {
if (empty($dateinvoice)) {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('DateInvoice')), null, 'errors');
$action = 'create';
$_GET['socid'] = $_POST['socid'];
//$_GET['socid'] = $_POST['socid'];
$error++;
} elseif ($dateinvoice > (dol_get_last_hour(dol_now('tzuserrel')) + (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY') ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) {
$error++;
@ -878,7 +878,7 @@ if (empty($reshook)) {
if (!GETPOST('ref_supplier')) {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('RefSupplierBill')), null, 'errors');
$action = 'create';
$_GET['socid'] = $_POST['socid'];
//$_GET['socid'] = $_POST['socid'];
$error++;
}
@ -1035,7 +1035,7 @@ if (empty($reshook)) {
if (empty($dateinvoice)) {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('DateInvoice')), null, 'errors');
$action = 'create';
$_GET['socid'] = $_POST['socid'];
//$_GET['socid'] = $_POST['socid'];
$error++;
} elseif ($dateinvoice > (dol_get_last_hour(dol_now('tzuserrel')) + (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY') ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) {
$error++;
@ -1046,7 +1046,7 @@ if (empty($reshook)) {
if (!GETPOST('ref_supplier')) {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('RefSupplierBill')), null, 'errors');
$action = 'create';
$_GET['socid'] = $_POST['socid'];
//$_GET['socid'] = $_POST['socid'];
$error++;
}
@ -1405,7 +1405,7 @@ if (empty($reshook)) {
setEventMessages($object->error, $object->errors, 'errors');
$action = 'create';
$_GET['socid'] = $_POST['socid'];
//$_GET['socid'] = $_POST['socid'];
} else {
$db->commit();

View file

@ -157,7 +157,7 @@ if ($object->id > 0) {
* Confirm delete file
*/
if ($action == 'delete') {
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
}
print '<table class="border tableforfield centpercent">';

View file

@ -137,7 +137,6 @@ $socid = GETPOSTINT('socid');
// Security check
if ($user->socid > 0) {
$action = '';
$_GET["action"] = '';
$socid = $user->socid;
}

View file

@ -80,13 +80,13 @@ $fieldstarget = $objimport->array_import_fields[0];
$valuestarget = $objimport->array_import_examplevalues[0];
$attachment = true;
if (isset($_GET["attachment"])) {
$attachment = $_GET["attachment"];
if (GETPOSTISSET("attachment")) {
$attachment = GETPOST("attachment");
}
//$attachment = false;
$contenttype = dol_mimetype($format);
if (isset($_GET["contenttype"])) {
$contenttype = $_GET["contenttype"];
if (GETPOSTISSET("contenttype")) {
$contenttype = GETPOST("contenttype");
}
//$contenttype='text/plain';
$outputencoding = 'UTF-8';

View file

@ -184,41 +184,6 @@ if (empty($array_match_file_to_database)) {
* Actions
*/
/*
if ($action=='downfield' || $action=='upfield')
{
$pos=$array_match_file_to_database[$_GET["field"]];
if ($action=='downfield') $newpos=$pos+1;
if ($action=='upfield') $newpos=$pos-1;
// Recherche code avec qui switcher
$newcode="";
foreach($array_match_file_to_database as $code=>$value)
{
if ($value == $newpos)
{
$newcode=$code;
break;
}
}
//print("Switch pos=$pos (code=".$_GET["field"].") and newpos=$newpos (code=$newcode)");
if ($newcode) // Si newcode trouve (protection contre resoumission de page)
{
$array_match_file_to_database[$_GET["field"]]=$newpos;
$array_match_file_to_database[$newcode]=$pos;
$_SESSION["dol_array_match_file_to_database"]=$serialized_array_match_file_to_database;
}
}
*/
// if ($action == 'builddoc') {
// // Build import file
// $result = $objimport->build_file($user, GETPOST('model', 'alpha'), $datatoimport, $array_match_file_to_database);
// if ($result < 0) {
// setEventMessages($objimport->error, $objimport->errors, 'errors');
// } else {
// setEventMessages($langs->trans("FileSuccessfullyBuilt"), null, 'mesgs');
// }
// }
if ($action == 'deleteprof') {
if (GETPOSTINT("id")) {
$objimport->fetch(GETPOSTINT("id"));
@ -286,7 +251,7 @@ if ($step == 3 && $datatoimport) {
$param .= '&endatlinenb='.urlencode($endatlinenb);
}
$file = $conf->import->dir_temp.'/'.GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
$file = $conf->import->dir_temp.'/'.GETPOST('urlfile');
$ret = dol_delete_file($file);
if ($ret) {
setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
@ -2085,7 +2050,7 @@ if ($step == 6 && $datatoimport) {
$obj->import_close_file();
}
$nboflines = (!empty($_GET["nboflines"]) ? $_GET["nboflines"] : dol_count_nb_of_line($conf->import->dir_temp.'/'.$filetoimport));
$nboflines = GETPOST("nboflines", dol_count_nb_of_line($conf->import->dir_temp.'/'.$filetoimport));
$param = '&format='.$format.'&datatoimport='.urlencode($datatoimport).'&filetoimport='.urlencode($filetoimport).'&nboflines='.urlencode($nboflines);
if ($excludefirstline) {

View file

@ -32,7 +32,7 @@ require 'main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
// If not defined, we select menu "home"
$_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ? GETPOST('mainmenu', 'aZ09') : 'home';
$_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ? GETPOST('mainmenu', 'aZ09') : 'home'; // Keep this ?
$action = GETPOST('action', 'aZ09');
$hookmanager->initHooks(array('index'));

View file

@ -87,13 +87,13 @@ if ($db->ok) {
print '<input type="password" id="pass_verif" name="pass_verif" autocomplete="new-password" minlength="8"></td></tr>';
print '</table>';
if (isset($_GET["error"]) && $_GET["error"] == 1) {
if (GETPOSTINT("error") == 1) {
print '<br>';
print '<div class="error">'.$langs->trans("PasswordsMismatch").'</div>';
$error = 0; // We show button
}
if (isset($_GET["error"]) && $_GET["error"] == 2) {
if (GETPOSTINT("error") == 2) {
print '<br>';
print '<div class="error">';
print $langs->trans("PleaseTypePassword");
@ -101,7 +101,7 @@ if ($db->ok) {
$error = 0; // We show button
}
if (isset($_GET["error"]) && $_GET["error"] == 3) {
if (GETPOSTINT("error") == 3) {
print '<br>';
print '<div class="error">'.$langs->trans("PleaseTypeALogin").'</div>';
$error = 0; // We show button

View file

@ -418,9 +418,9 @@ if (!$ok && isset($argv[1])) {
}
dolibarr_install_syslog("Exit ".$ret);
dolibarr_install_syslog("--- upgrade: end ".((int) (!$ok && empty($_GET["ignoreerrors"])))." dirmodule=".$dirmodule);
dolibarr_install_syslog("--- upgrade: end ".((int) (!$ok && !GETPOST("ignoreerrors")))." dirmodule=".$dirmodule);
$nonext = (!$ok && empty($_GET["ignoreerrors"])) ? 2 : 0;
$nonext = (!$ok && !GETPOST("ignoreerrors")) ? 2 : 0;
if ($dirmodule) {
$nonext = 1;
}

View file

@ -35,7 +35,7 @@ if (!defined('NOREQUIREHTML')) {
if (!defined('NOREQUIREAJAX')) {
define('NOREQUIREAJAX', '1');
}
if (empty($_GET['keysearch']) && !defined('NOREQUIREHTML')) {
if (empty($_GET['keysearch']) && !defined('NOREQUIREHTML')) { // Keep $_GET here, GETPOST is not yet defined
define('NOREQUIREHTML', '1');
}
@ -67,7 +67,6 @@ restrictedArea($user, 'produit|service|commande|propal|facture', 0, 'product&pro
*/
// print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
// print_r($_GET);
if ($action == 'fetch' && !empty($id)) {
// action='fetch' is used to get product information on a product. So when action='fetch', id must be the product id.

View file

@ -66,8 +66,8 @@ $extrafields = new ExtraFields($db);
// If socid provided by ajax company selector
if (GETPOSTINT('search_fourn_id')) {
$_GET['id_fourn'] = GETPOSTINT('search_fourn_id');
$_POST['id_fourn'] = GETPOSTINT('search_fourn_id');
$_GET['id_fourn'] = GETPOSTINT('search_fourn_id'); // Keep set to $_GET an $_POST. Used later.
$_POST['id_fourn'] = GETPOSTINT('search_fourn_id'); // Keep set to $_GET an $_POST. Used later.
}
// Security check

View file

@ -519,7 +519,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') {
$param .= '&endatlinenb='.urlencode($endatlinenb);
}
$file = $conf->stock->dir_temp.'/'.GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
$file = $conf->stock->dir_temp.'/'.GETPOST('urlfile');
$ret = dol_delete_file($file);
if ($ret) {
setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');

View file

@ -70,7 +70,7 @@ $ref = GETPOST('ref', 'alpha');
$stocklimit = (float) GETPOST('seuil_stock_alerte');
$desiredstock = GETPOST('desiredstock');
$cancel = GETPOST('cancel', 'alpha');
$fieldid = isset($_GET["ref"]) ? 'ref' : 'rowid';
$fieldid = GETPOSTISSET("ref") ? 'ref' : 'rowid';
$d_eatby = dol_mktime(0, 0, 0, GETPOSTINT('eatbymonth'), GETPOSTINT('eatbyday'), GETPOSTINT('eatbyyear'));
$d_sellby = dol_mktime(0, 0, 0, GETPOSTINT('sellbymonth'), GETPOSTINT('sellbyday'), GETPOSTINT('sellbyyear'));
$pdluoid = GETPOSTINT('pdluoid');

View file

@ -30,30 +30,32 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
// Load translation files required by the page
$langs->load("stocks");
// Security check
$result = restrictedArea($user, 'stock');
$sref = GETPOST("sref", 'alpha');
$snom = GETPOST("snom", 'alpha');
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');
$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT('page');
if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
// If $page is not defined, or '' or -1 or if we click on clear filters
$page = 0;
}
$offset = $limit * $page;
if (!$sortfield) {
$sortfield = "e.ref";
}
if (!$sortorder) {
$sortorder = "ASC";
}
$page = $_GET["page"];
if ($page < 0) {
$page = 0;
}
$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
$offset = $limit * $page;
$year = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
// Security check
$result = restrictedArea($user, 'stock');
/*
* View

View file

@ -426,7 +426,7 @@ if ($id > 0 || !empty($ref)) {
print '<td>';
$thirdpartyofproject = $projectstatic->getListContactId('thirdparty');
$selectedCompany = isset($_GET["newcompany"]) ? $_GET["newcompany"] : $projectstatic->socid;
$selectedCompany = GETPOSISSET("newcompany") ? GETPOST("newcompany") : $projectstatic->socid;
$selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', $thirdpartyofproject, 0, '&withproject='.$withproject);
print '</td>';

View file

@ -2338,7 +2338,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
// Product
if (!empty($arrayfields['t.fk_product']['checked'])) {
print '<td class="nowraponall">';
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);

View file

@ -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';

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -53,7 +53,7 @@ if (empty($usedolheader)) {
<!-- Includes for JQuery (Ajax library) -->
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/css/base/jquery-ui.css" />
<!-- <link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/datatables/media/css/jquery.dataTables.css" /> -->
<link rel="stylesheet" type="text/css" title="default" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/style.css.php<?php echo ($_GET["dol_use_jmobile"] == 1) ? '?dol_use_jmobile=1&dol_optimize_smallscreen=1' : ''; ?>" />
<link rel="stylesheet" type="text/css" title="default" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/style.css.php<?php echo (GETPOST("dol_use_jmobile") == 1) ? '?dol_use_jmobile=1&dol_optimize_smallscreen=1' : ''; ?>" />
<!-- Includes JS for JQuery -->
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/js/jquery.min.js"></script>
<!-- migration fixes for removed Jquery functions -->

View file

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

View file

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

View file

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

View file

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

View file

@ -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) {

View file

@ -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++;
}

View file

@ -74,7 +74,6 @@ restrictedArea($user, 'societe', $object->id, '&societe');
top_httphead('application/json');
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
//print_r($_GET);
if (!empty($action) && $action == 'fetch' && !empty($id)) {
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';

View file

@ -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;
}

View file

@ -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

View file

@ -33,7 +33,7 @@ $langs->load("cashdesk");
$id = GETPOSTINT('id');
$_GET['optioncss'] = "print";
//$_GET['optioncss'] = "print";
print '<center>';

View file

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

View file

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

View file

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

View file

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

View file

@ -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')) {

Some files were not shown because too many files have changed in this diff Show more