Correct usage of parameter 'none' in GETPOST
This commit is contained in:
parent
77df19009d
commit
733d1caac6
@ -77,7 +77,7 @@ if ($action == 'setmod')
|
||||
|
||||
if ($action == 'set_BANK_CHEQUERECEIPT_FREE_TEXT')
|
||||
{
|
||||
$freetext = GETPOST('BANK_CHEQUERECEIPT_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$freetext = GETPOST('BANK_CHEQUERECEIPT_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
|
||||
$res = dolibarr_set_const($db, "BANK_CHEQUERECEIPT_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
@ -180,7 +180,7 @@ else if ($action == 'set_COMMANDE_DRAFT_WATERMARK')
|
||||
|
||||
else if ($action == 'set_ORDER_FREE_TEXT')
|
||||
{
|
||||
$freetext = GETPOST("ORDER_FREE_TEXT"); // No alpha here, we want exact string
|
||||
$freetext = GETPOST("ORDER_FREE_TEXT",'none'); // No alpha here, we want exact string
|
||||
|
||||
$res = dolibarr_set_const($db, "ORDER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
@ -158,7 +158,7 @@ else if ($action == 'setmod')
|
||||
|
||||
else if ($action == 'set_other')
|
||||
{
|
||||
$freetext= GETPOST('CONTRACT_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$freetext= GETPOST('CONTRACT_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
$res1 = dolibarr_set_const($db, "CONTRACT_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
$draft= GETPOST('CONTRACT_DRAFT_WATERMARK','alpha');
|
||||
|
||||
@ -78,7 +78,7 @@ if ($action == 'updateMask')
|
||||
|
||||
else if ($action == 'set_param')
|
||||
{
|
||||
$freetext=GETPOST('SHIPPING_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$freetext=GETPOST('SHIPPING_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
$res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
if ($res <= 0)
|
||||
{
|
||||
|
||||
@ -168,7 +168,7 @@ else if ($action == 'setoptions')
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
$freetext= GETPOST('EXPENSEREPORT_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$freetext= GETPOST('EXPENSEREPORT_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
$res1 = dolibarr_set_const($db, "EXPENSEREPORT_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
$draft= GETPOST('EXPENSEREPORT_DRAFT_WATERMARK','alpha');
|
||||
|
||||
@ -206,7 +206,7 @@ if ($action == 'set_FACTURE_DRAFT_WATERMARK')
|
||||
|
||||
if ($action == 'set_INVOICE_FREE_TEXT')
|
||||
{
|
||||
$freetext = GETPOST('INVOICE_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$freetext = GETPOST('INVOICE_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
|
||||
$res = dolibarr_set_const($db, "INVOICE_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
@ -160,7 +160,7 @@ else if ($action == 'setmod')
|
||||
|
||||
else if ($action == 'set_FICHINTER_FREE_TEXT')
|
||||
{
|
||||
$freetext= GETPOST('FICHINTER_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$freetext= GETPOST('FICHINTER_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
$res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
@ -74,7 +74,7 @@ if ($action == 'updateMask')
|
||||
|
||||
if ($action == 'set_DELIVERY_FREE_TEXT')
|
||||
{
|
||||
$free=GETPOST('DELIVERY_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$free=GETPOST('DELIVERY_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
$res=dolibarr_set_const($db, "DELIVERY_FREE_TEXT",$free,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
@ -71,7 +71,7 @@ if ($action == 'setmod')
|
||||
|
||||
if ($action == 'setparams')
|
||||
{
|
||||
$freetext = GETPOST('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS'); // No alpha here, we want exact string
|
||||
$freetext = GETPOST('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS','none'); // No alpha here, we want exact string
|
||||
|
||||
$res = dolibarr_set_const($db, "FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
@ -81,24 +81,11 @@ if ($action == 'setparams')
|
||||
{
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
|
||||
/*
|
||||
$freetext = GETPOST('INVOICE_AUTO_FILLJS'); // No alpha here, we want exact string
|
||||
|
||||
$res = dolibarr_set_const($db, "INVOICE_AUTO_FILLJS",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if ($error)
|
||||
{
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}*/
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -135,7 +135,7 @@ if ($action == 'set_PROPALE_DRAFT_WATERMARK')
|
||||
|
||||
if ($action == 'set_PROPOSAL_FREE_TEXT')
|
||||
{
|
||||
$freetext = GETPOST('PROPOSAL_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$freetext = GETPOST('PROPOSAL_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
|
||||
$res = dolibarr_set_const($db, "PROPOSAL_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
@ -172,7 +172,7 @@ if ($action == 'addcat')
|
||||
|
||||
if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT')
|
||||
{
|
||||
$freetext = GETPOST('SUPPLIER_INVOICE_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$freetext = GETPOST('SUPPLIER_INVOICE_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
|
||||
$res = dolibarr_set_const($db, "SUPPLIER_INVOICE_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
@ -169,7 +169,7 @@ else if ($action == 'addcat')
|
||||
|
||||
else if ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||
{
|
||||
$freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
$doubleapproval = GETPOST('SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED','alpha');
|
||||
$doubleapproval = price2num($doubleapproval );
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@ if ($action == 'set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK')
|
||||
|
||||
if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT')
|
||||
{
|
||||
$freetext = GETPOST('SUPPLIER_PROPOSAL_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$freetext = GETPOST('SUPPLIER_PROPOSAL_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
|
||||
$res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
@ -121,7 +121,7 @@ else if ($action == 'del')
|
||||
// Options
|
||||
if ($action == 'set_DONATION_ACCOUNTINGACCOUNT')
|
||||
{
|
||||
$account = GETPOST('DONATION_ACCOUNTINGACCOUNT'); // No alpha here, we want exact string
|
||||
$account = GETPOST('DONATION_ACCOUNTINGACCOUNT','alpha');
|
||||
|
||||
$res = dolibarr_set_const($db, "DONATION_ACCOUNTINGACCOUNT",$account,'chaine',0,'',$conf->entity);
|
||||
|
||||
@ -139,7 +139,7 @@ if ($action == 'set_DONATION_ACCOUNTINGACCOUNT')
|
||||
|
||||
if ($action == 'set_DONATION_MESSAGE')
|
||||
{
|
||||
$freemessage = GETPOST('DONATION_MESSAGE'); // No alpha here, we want exact string
|
||||
$freemessage = GETPOST('DONATION_MESSAGE','none'); // No alpha here, we want exact string
|
||||
|
||||
$res = dolibarr_set_const($db, "DONATION_MESSAGE",$freemessage,'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
|
||||
-- Requests to clean corrupted database
|
||||
-- Requests to clean corrupted data
|
||||
|
||||
|
||||
UPDATE llx_user set api_key = null where api_key = '';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user