Standardize and update code

This commit is contained in:
Philippe GRAND 2018-10-12 16:09:05 +02:00
parent 181c1e0b77
commit c5edb3289b

View File

@ -139,13 +139,13 @@ $sourceList=array();
* Actions
*/
if (GETPOST('button_removefilter') || GETPOST('button_removefilter.x') || GETPOST('button_removefilter_x'))
if (GETPOST('button_removefilter','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter_x','alpha'))
{
$search_country_id = '';
}
// Actions add or modify an entry into a dictionary
if (GETPOST('actionadd') || GETPOST('actionmodify'))
if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha'))
{
$listfield=explode(',', str_replace(' ', '',$tabfield[$id]));
$listfieldinsert=explode(',',$tabfieldinsert[$id]);
@ -235,7 +235,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null
// Si verif ok et action add, on ajoute la ligne
if ($ok && GETPOST('actionadd'))
if ($ok && GETPOST('actionadd','alpha'))
{
if ($tabrowid[$id])
{
@ -300,7 +300,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
}
// Si verif ok et action modify, on modifie la ligne
if ($ok && GETPOST('actionmodify'))
if ($ok && GETPOST('actionmodify','alpha'))
{
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
@ -341,7 +341,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
}
if (GETPOST('actioncancel'))
if (GETPOST('actioncancel','alpha'))
{
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
}
@ -560,7 +560,7 @@ if ($id)
$obj = new stdClass();
// If data was already input, we define them in obj to populate input fields.
if (GETPOST('actionadd'))
if (GETPOST('actionadd','alpha'))
{
foreach ($fieldlist as $key=>$val)
{