Standardize and update code
This commit is contained in:
parent
181c1e0b77
commit
c5edb3289b
@ -139,13 +139,13 @@ $sourceList=array();
|
|||||||
* Actions
|
* 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 = '';
|
$search_country_id = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actions add or modify an entry into a dictionary
|
// 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]));
|
$listfield=explode(',', str_replace(' ', '',$tabfield[$id]));
|
||||||
$listfieldinsert=explode(',',$tabfieldinsert[$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
|
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
|
// Si verif ok et action add, on ajoute la ligne
|
||||||
if ($ok && GETPOST('actionadd'))
|
if ($ok && GETPOST('actionadd','alpha'))
|
||||||
{
|
{
|
||||||
if ($tabrowid[$id])
|
if ($tabrowid[$id])
|
||||||
{
|
{
|
||||||
@ -300,7 +300,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Si verif ok et action modify, on modifie la ligne
|
// 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]; }
|
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
|
||||||
else { $rowidcol="rowid"; }
|
else { $rowidcol="rowid"; }
|
||||||
@ -341,7 +341,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
//$_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
|
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||||
}
|
}
|
||||||
@ -560,7 +560,7 @@ if ($id)
|
|||||||
|
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
// If data was already input, we define them in obj to populate input fields.
|
// 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)
|
foreach ($fieldlist as $key=>$val)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user