Standardize and update code

This commit is contained in:
Philippe GRAND 2018-10-12 16:44:25 +02:00
parent 4df574d58e
commit bd426d1052
3 changed files with 5 additions and 5 deletions

View File

@ -37,9 +37,9 @@ $id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int'); $rowid = GETPOST('rowid', 'int');
$cancel = GETPOST('cancel','alpha'); $cancel = GETPOST('cancel','alpha');
$action = GETPOST('action','aZ09'); $action = GETPOST('action','aZ09');
$cat_id = GETPOST('account_category'); $cat_id = GETPOST('account_category','int');
$selectcpt = GETPOST('cpt_bk', 'array'); $selectcpt = GETPOST('cpt_bk', 'array');
$cpt_id = GETPOST('cptid'); $cpt_id = GETPOST('cptid','int');
if ($cat_id == 0) { if ($cat_id == 0) {
$cat_id = null; $cat_id = null;

View File

@ -76,7 +76,7 @@ $list_account = array (
$accounting_mode = empty($conf->global->ACCOUNTING_MODE) ? 'RECETTES-DEPENSES' : $conf->global->ACCOUNTING_MODE; $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'); $chartofaccounts = GETPOST('chartofaccounts', 'int');

View File

@ -166,7 +166,7 @@ if ($action == 'create')
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Label // Label
print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans("Label") . '</td><td><input name="label" size="32" value="' . GETPOST("label") . '"></td></tr>'; print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans("Label") . '</td><td><input name="label" size="32" value="' . GETPOST('label', 'alpha') . '"></td></tr>';
// Date start // Date start
print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>'; print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>';
@ -183,7 +183,7 @@ if ($action == 'create')
print '<tr>'; print '<tr>';
print '<td class="fieldrequired">' . $langs->trans("Status") . '</td>'; print '<td class="fieldrequired">' . $langs->trans("Status") . '</td>';
print '<td class="valeur">'; print '<td class="valeur">';
print $form->selectarray('statut', $statut2label, GETPOST('statut')); print $form->selectarray('statut', $statut2label, GETPOST('statut', 'int'));
print '</td></tr>'; print '</td></tr>';
*/ */