[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 06/86: CFGMENU : bug cannot update menu
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 06/86: CFGMENU : bug cannot update menu |
Date: |
Thu, 19 Sep 2024 02:41:47 -0400 (EDT) |
sparkyx pushed a commit to branch unstable
in repository noalyss.
commit 6e1c536564e31815a2f42e9e2a223e35f572e3f1
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Sep 1 22:01:00 2024 +0200
CFGMENU : bug cannot update menu
---
include/class/menu_ref.class.php | 4 +++-
include/menu.inc.php | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/class/menu_ref.class.php b/include/class/menu_ref.class.php
index aab3b5f0c..f86c0c0a0 100644
--- a/include/class/menu_ref.class.php
+++ b/include/class/menu_ref.class.php
@@ -45,8 +45,10 @@ class Menu_Ref extends Menu_Ref_SQL
{
throw new Exception(_("le code ne peut être vide"));
}
+
$this->format_code();
- if ( $this->cn->get_value("select count(*) from menu_ref where
me_code=$1",array($this->me_code)) > 0)
+ if (isset ($_POST['create_menu'])
+ && $this->cn->get_value("select count(*) from menu_ref where
me_code=$1",array($this->me_code)) > 0)
throw new Exception ('Doublon');
if (trim($this->me_code)=='')
throw new Exception ('Ce menu existe déjà');
diff --git a/include/menu.inc.php b/include/menu.inc.php
index 47b626611..0dbdd3c06 100644
--- a/include/menu.inc.php
+++ b/include/menu.inc.php
@@ -86,6 +86,7 @@ if ( isset($_POST['create_menu'])||
isset($_POST['modify_menu']))
{
if (isset($_POST['create_menu']))
{
+ if ($menu_ref->verify() == 0)
$menu_ref->insert();
}
elseif (isset($_POST['modify_menu']))
- [Noalyss-commit] [noalyss] branch unstable updated (ae29565cf -> 852cddcc1), dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 01/86: Bug : fix create event from AGENDA, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 04/86: CFGMENU : bug cannot update menu, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 10/86: Merge branch 'pre-stable' into stable, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 12/86: Cosmetic #0002375: Menu COMPTA/LET/LETCARD : le nom de la fiche n'apparaît pas., dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 15/86: Merge branch 'pre-stable' into stable, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 06/86: CFGMENU : bug cannot update menu,
dwm <=
- [Noalyss-commit] [noalyss] 09/86: C0OPT1 , C1MENU : improve doc, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 16/86: wip : cosmetic, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 27/86: Cosmetic improve widget bookmark color for hover, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 32/86: RECONCILE : fix bug : sum incorrect if several items RECONCILE : remove direct access to, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 41/86: Bug : some db doesn't have the view v_quant_detail, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 42/86: Improve : creation db , mod1 , mod2 and account_repository remove the alter table disable all triggers, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 03/86: Cosmetic: without z-index, the class col is behind the autocomplete div in COMPANY, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 35/86: RECONCILE : VAT ND not in account, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 31/86: RECONCILE : fix bug : sum incorrect if several items, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 07/86: C0OPT1 , C1MENU : improve doc, dwm, 2024/09/19