From 08abc1cc4fa34e186825d5c345f691c86f224db6 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 27 Jul 2005 15:59:44 +0000 Subject: [PATCH] Correction erreur de permissions --- htdocs/compta/bank/categ.php | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index fc56c47ed9e..baa49b40b0d 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -22,17 +22,15 @@ */ /*! - \file htdocs/compta/bank/categ.php - \ingroup compta - \brief Page ajout de catégories banaires - \version $Revision$ + \file htdocs/compta/bank/categ.php + \ingroup compta + \brief Page ajout de catégories bancaires + \version $Revision$ */ require("./pre.inc.php"); -$user->getrights('compta'); - -if (!$user->admin && !$user->rights->banque->configurer) +if (!$user->rights->banque->configurer) accessforbidden(); llxHeader(); @@ -43,18 +41,18 @@ llxHeader(); */ if ($_POST["action"] == 'add') { - if ($_POST["label"]) { + if ($_POST["label"]) + { $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_categ (label) VALUES ('".$_POST["label"]."')"; $result = $db->query($sql); - + if (!$result) - { - dolibarr_print_error($db); - } + { + dolibarr_print_error($db); + } } } - /* * Affichage liste des catégories */