From c7ca99accb2db6ca1a1f8a47d84f0c87dadff54e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Oct 2020 15:38:07 +0200 Subject: [PATCH] Fix default value of enabled property of menu entry --- htdocs/core/class/menubase.class.php | 1 + htdocs/install/mysql/tables/llx_menu.sql | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 3c0c6bd9389..8695ef88ef4 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -173,6 +173,7 @@ class Menubase global $conf, $langs; // Clean parameters + if (!isset($this->enabled)) $this->enabled = '1'; $this->menu_handler = trim($this->menu_handler); $this->module = trim($this->module); $this->type = trim($this->type); diff --git a/htdocs/install/mysql/tables/llx_menu.sql b/htdocs/install/mysql/tables/llx_menu.sql index 4408cb69627..6f908cd5bcf 100644 --- a/htdocs/install/mysql/tables/llx_menu.sql +++ b/htdocs/install/mysql/tables/llx_menu.sql @@ -39,7 +39,7 @@ CREATE TABLE llx_menu langs varchar(100), -- Lang file to load for translation level smallint, -- Deprecated. Not used. perms text, -- Condition to show enabled or disabled - enabled text NULL default '1', -- Condition to show or hide + enabled text NULL, -- Condition to show or hide usertype integer NOT NULL DEFAULT 0, -- 0 if menu for all users, 1 for external only, 2 for internal only tms timestamp