Fix: Warning GETPOST with alpha and int must be used ONLY if content is
not a free text.
This commit is contained in:
parent
30026ecddb
commit
32d2b0a9d6
@ -50,7 +50,7 @@ $action = GETPOST('action','alpha');
|
|||||||
if ($action == 'update' || $action == 'add')
|
if ($action == 'update' || $action == 'add')
|
||||||
{
|
{
|
||||||
$constname=GETPOST('constname','alpha');
|
$constname=GETPOST('constname','alpha');
|
||||||
$constvalue=(GETPOST('constvalue_'.$constname,'alpha') ? GETPOST('constvalue_'.$constname,'alpha') : GETPOST('constvalue','alpha'));
|
$constvalue=(GETPOST('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname) : GETPOST('constvalue'));
|
||||||
|
|
||||||
if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue='';
|
if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue='';
|
||||||
if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice
|
if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice
|
||||||
@ -60,7 +60,7 @@ if ($action == 'update' || $action == 'add')
|
|||||||
}
|
}
|
||||||
|
|
||||||
$consttype=GETPOST('consttype','alpha');
|
$consttype=GETPOST('consttype','alpha');
|
||||||
$constnote=GETPOST('constnote','alpha');
|
$constnote=GETPOST('constnote');
|
||||||
$res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity);
|
$res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity);
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
@ -78,7 +78,7 @@ if ($action == 'update' || $action == 'add')
|
|||||||
// Action activation d'un sous module du module adherent
|
// Action activation d'un sous module du module adherent
|
||||||
if ($action == 'set')
|
if ($action == 'set')
|
||||||
{
|
{
|
||||||
$result=dolibarr_set_const($db, GETPOST('name','alpha'),GETPOST('value','alpha'),'',0,'',$conf->entity);
|
$result=dolibarr_set_const($db, GETPOST('name','alpha'),GETPOST('value'),'',0,'',$conf->entity);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
print $db->error();
|
print $db->error();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user