Fix GETPOST
This commit is contained in:
parent
b7a0de11c6
commit
ec108162e3
@ -657,7 +657,7 @@ if (empty($reshook))
|
||||
$_GET['socid'] = $_POST['socid'];
|
||||
$error++;
|
||||
}
|
||||
if (!($_POST['fac_replacement'] > 0)) {
|
||||
if (! (GETPOST('fac_replacement', 'int') > 0)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ReplaceInvoice")), null, 'errors');
|
||||
}
|
||||
@ -870,7 +870,7 @@ if (empty($reshook))
|
||||
if (!$error && $_POST['origin'] && $_POST['originid'])
|
||||
{
|
||||
// Parse element/subelement (ex: project_task)
|
||||
$element = $subelement = GETPOST('origin');
|
||||
$element = $subelement = GETPOST('origin', 'alpha');
|
||||
/*if (preg_match('/^([^_]+)_([^_]+)/i',$_POST['origin'],$regs))
|
||||
{
|
||||
$element = $regs[1];
|
||||
@ -894,8 +894,8 @@ if (empty($reshook))
|
||||
{
|
||||
$element = 'projet';
|
||||
}
|
||||
$object->origin = GETPOST('origin');
|
||||
$object->origin_id = GETPOST('originid');
|
||||
$object->origin = GETPOST('origin', 'alpha');
|
||||
$object->origin_id = GETPOST('originid', 'int');
|
||||
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/'.$element.'/class/'.$subelement.'.class.php';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user