diff --git a/admin/setup_mvp.php b/admin/setup_mvp.php index 4e7879f..4bbc699 100644 --- a/admin/setup_mvp.php +++ b/admin/setup_mvp.php @@ -37,22 +37,17 @@ $form = new Form($db); // Handle form submission $action = GETPOST('action', 'alpha'); if ($action == 'update_mappings') { - // CSRF protection - if (!checkToken()) { - setEventMessages($langs->trans("ErrorCSRFToken"), null, 'errors'); - } else { - $ca3_definitions = $config->getCA3LineDefinitions(); + $ca3_definitions = $config->getCA3LineDefinitions(); + + foreach ($ca3_definitions as $line => $definition) { + $account_codes = GETPOST('account_codes_' . $line, 'array'); - foreach ($ca3_definitions as $line => $definition) { - $account_codes = GETPOST('account_codes_' . $line, 'array'); - - if (!empty($account_codes)) { - $config->updateAccountMapping($line, $account_codes); - } + if (!empty($account_codes)) { + $config->updateAccountMapping($line, $account_codes); } - - setEventMessages($langs->trans("ConfigurationUpdated"), null, 'mesgs'); } + + setEventMessages($langs->trans("ConfigurationUpdated"), null, 'mesgs'); } // Get current mappings