This commit is contained in:
Laurent Destailleur 2023-02-09 18:50:22 +01:00
parent e5de31a7de
commit e9ce09f9d1

View File

@ -411,6 +411,9 @@ function dol_shutdown()
/**
* Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
* Warning:
* For action=add, use: $var = GETPOST('var'); // No GETPOSTISSET, so GETPOST always called and default value is retreived if not a form POST, and value of form is retreived if it is a form POST.
* For action=update, use: $var = GETPOSTISSET('var') ? GETPOST('var') : $object->var;
*
* @param string $paramname Name or parameter to test
* @return boolean True if we have just submit a POST or GET request with the parameter provided (even if param is empty)