From 2f8190838156c20b435ccf1f47ff674f72640a9c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Oct 2008 20:20:43 +0000 Subject: [PATCH] Simplify code --- htdocs/admin/delais.php | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 3ae70134f51..cd77ac98e05 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -37,8 +37,7 @@ $langs->load("banks"); if (!$user->admin) accessforbidden(); -if ( (isset($_POST["action"]) && $_POST["action"] == 'update') - || (isset($_POST["action"]) && $_POST["action"] == 'updateedit') ) +if ( (isset($_POST["action"]) && $_POST["action"] == 'update')) { //Conversion des jours en secondes dolibarr_set_const($db, "MAIN_DELAY_ACTIONS_TODO",$_POST["ActionsToDo"]); @@ -52,13 +51,12 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') dolibarr_set_const($db, "MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE",$_POST["TransactionsToConciliate"]); dolibarr_set_const($db, "MAIN_DELAY_CHEQUES_TO_DEPOSIT",$_POST["ChequesToDeposit"]); dolibarr_set_const($db, "MAIN_DELAY_MEMBERS",$_POST["Members"]); - if ($_POST['action'] != 'updateedit') - { - Header("Location: delais.php"); - } } +/* + * View + */ llxHeader(); @@ -72,25 +70,8 @@ $form = new Form($db); $countrynotdefined=''.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; -if ((isset($_GET["action"]) && $_GET["action"] == 'edit') - || (isset($_POST["action"]) && $_POST["action"] == 'updateedit') ) +if ((isset($_GET["action"]) && $_GET["action"] == 'edit')) { - /* - * Edition des param?tres - */ - print ' - - '; - print '
'; print ''; $var=true;