From bd426d105235080055e852aaa5c39bc39f581414 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 12 Oct 2018 16:44:25 +0200 Subject: [PATCH] Standardize and update code --- htdocs/accountancy/admin/categories.php | 4 ++-- htdocs/accountancy/admin/defaultaccounts.php | 2 +- htdocs/accountancy/admin/fiscalyear_card.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index 735c5595ddc..6e003738173 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -37,9 +37,9 @@ $id = GETPOST('id', 'int'); $rowid = GETPOST('rowid', 'int'); $cancel = GETPOST('cancel','alpha'); $action = GETPOST('action','aZ09'); -$cat_id = GETPOST('account_category'); +$cat_id = GETPOST('account_category','int'); $selectcpt = GETPOST('cpt_bk', 'array'); -$cpt_id = GETPOST('cptid'); +$cpt_id = GETPOST('cptid','int'); if ($cat_id == 0) { $cat_id = null; diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 8cd45c1cfda..31fc04fa745 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -76,7 +76,7 @@ $list_account = array ( $accounting_mode = empty($conf->global->ACCOUNTING_MODE) ? 'RECETTES-DEPENSES' : $conf->global->ACCOUNTING_MODE; -if (GETPOST('change_chart')) +if (GETPOST('change_chart', 'alpha')) { $chartofaccounts = GETPOST('chartofaccounts', 'int'); diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index cc4dd9dbb7f..05c7a3fd174 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -166,7 +166,7 @@ if ($action == 'create') print ''; // Label - print ''; + print ''; // Date start print ''; print ''; print ''; */
' . $langs->trans("Label") . '
' . $langs->trans("Label") . '
' . $langs->trans("DateStart") . ''; @@ -183,7 +183,7 @@ if ($action == 'create') print '
' . $langs->trans("Status") . ''; - print $form->selectarray('statut', $statut2label, GETPOST('statut')); + print $form->selectarray('statut', $statut2label, GETPOST('statut', 'int')); print '