diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php
index 88f5383250a..4cd18c35bd4 100644
--- a/htdocs/admin/menus.php
+++ b/htdocs/admin/menus.php
@@ -62,16 +62,16 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update' && empty($_POST["can
{
$_SESSION["mainmenu"]="home"; // Le gestionnaire de menu a pu changer
- dolibarr_set_const($db, "MAIN_MENU_BARRETOP", $_POST["main_menu_barretop"],'chaine',0,'',$conf->entity);
+ dolibarr_set_const($db, "MAIN_MENU_STANDARD", $_POST["MAIN_MENU_STANDARD"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MENU_SMARTPHONE", $_POST["main_menu_smartphone"],'chaine',0,'',$conf->entity);
- dolibarr_set_const($db, "MAIN_MENUFRONT_BARRETOP", $_POST["main_menufront_barretop"],'chaine',0,'',$conf->entity);
+ dolibarr_set_const($db, "MAIN_MENUFRONT_STANDARD", $_POST["MAIN_MENUFRONT_STANDARD"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MENUFRONT_SMARTPHONE",$_POST["main_menufront_smartphone"],'chaine',0,'',$conf->entity);
// Define list of menu handlers to initialize
$listofmenuhandler=array();
- $listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menu_barretop"])]=1;
- $listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menufront_barretop"])]=1;
+ $listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["MAIN_MENU_STANDARD"])]=1;
+ $listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["MAIN_MENUFRONT_STANDARD"])]=1;
if (isset($_POST["main_menu_smartphone"])) $listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menu_smartphone"])]=1;
if (isset($_POST["main_menufront_smartphone"])) $listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menufront_smartphone"])]=1;
@@ -156,10 +156,10 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
$var=!$var;
print '
| '.$langs->trans("DefaultMenuManager").' | ';
print '';
- print $htmladmin->select_menu($conf->global->MAIN_MENU_BARRETOP,'main_menu_barretop',$dirtop);
+ print $htmladmin->select_menu($conf->global->MAIN_MENU_STANDARD,'MAIN_MENU_STANDARD',$dirtop);
print ' | ';
print '';
- print $htmladmin->select_menu($conf->global->MAIN_MENUFRONT_BARRETOP,'main_menufront_barretop',$dirtop);
+ print $htmladmin->select_menu($conf->global->MAIN_MENUFRONT_STANDARD,'MAIN_MENUFRONT_STANDARD',$dirtop);
print ' | ';
print '
';
@@ -205,11 +205,11 @@ else
$var=!$var;
print '| '.$langs->trans("DefaultMenuManager").' | ';
print '';
- $filelib=preg_replace('/.php$/i','',$conf->global->MAIN_MENU_BARRETOP);
+ $filelib=preg_replace('/.php$/i','',$conf->global->MAIN_MENU_STANDARD);
print $filelib;
print ' | ';
print '';
- $filelib=preg_replace('/.php$/i','',$conf->global->MAIN_MENUFRONT_BARRETOP);
+ $filelib=preg_replace('/.php$/i','',$conf->global->MAIN_MENUFRONT_STANDARD);
print $filelib;
print ' | ';
print '
';
diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php
index 893c0f3b9de..0773f3f3a48 100644
--- a/htdocs/admin/menus/edit.php
+++ b/htdocs/admin/menus/edit.php
@@ -43,7 +43,7 @@ $dirmenu = array($dirleft,$dirsmartphone);
$mesg=$_GET["mesg"];
-$menu_handler_top=$conf->global->MAIN_MENU_BARRETOP;
+$menu_handler_top=$conf->global->MAIN_MENU_STANDARD;
$menu_handler_smartphone=$conf->global->MAIN_MENU_SMARTPHONE;
$menu_handler_top=preg_replace('/_backoffice.php/i','',$menu_handler_top);
$menu_handler_top=preg_replace('/_frontoffice.php/i','',$menu_handler_top);
diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php
index 746411e49fb..69696d8a892 100644
--- a/htdocs/admin/menus/index.php
+++ b/htdocs/admin/menus/index.php
@@ -43,7 +43,7 @@ $dirmenu = array($dirleft,$dirsmartphone);
$mesg=$_GET["mesg"];
-$menu_handler_top=$conf->global->MAIN_MENU_BARRETOP;
+$menu_handler_top=$conf->global->MAIN_MENU_STANDARD;
$menu_handler_smartphone=$conf->global->MAIN_MENU_SMARTPHONE;
$menu_handler_top=preg_replace('/_backoffice.php/i','',$menu_handler_top);
$menu_handler_top=preg_replace('/_frontoffice.php/i','',$menu_handler_top);
diff --git a/htdocs/install/mysql/data/llx_const.sql b/htdocs/install/mysql/data/llx_const.sql
index c3294d38274..626788975b4 100644
--- a/htdocs/install/mysql/data/llx_const.sql
+++ b/htdocs/install/mysql/data/llx_const.sql
@@ -60,10 +60,8 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_M
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_LISTE_LIMIT','25','chaine','Longueur maximum des listes',0,0);
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SHOW_WORKBOARD','1','yesno','Affichage tableau de bord de travail Dolibarr',0,0);
-insert into llx_const (name, value, type, note, visible) values ('MAIN_MENU_BARRETOP','eldy_backoffice.php','chaine','Module de gestion de la barre de menu pour utilisateurs internes',0);
-insert into llx_const (name, value, type, note, visible) values ('MAIN_MENUFRONT_BARRETOP','eldy_frontoffice.php','chaine','Module de gestion de la barre de menu pour utilisateurs externes',0);
---insert into llx_const (name, value, type, note, visible) values ('MAIN_MENU_BARRELEFT','eldy_backoffice.php','chaine','Module de gestion de la barre de menu gauche pour utilisateurs internes',0);
---insert into llx_const (name, value, type, note, visible) values ('MAIN_MENUFRONT_BARRELEFT','eldy_frontoffice.php','chaine','Module de gestion de la barre de menu gauche pour utilisateurs externes',0);
+insert into llx_const (name, value, type, note, visible) values ('MAIN_MENU_STANDARD','eldy_backoffice.php','chaine','Module de gestion de la barre de menu pour utilisateurs internes',0);
+insert into llx_const (name, value, type, note, visible) values ('MAIN_MENUFRONT_STANDARD','eldy_frontoffice.php','chaine','Module de gestion de la barre de menu pour utilisateurs externes',0);
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENU_SMARTPHONE','iphone_backoffice.php','chaine','Module de gestion de la barre de menu smartphone pour utilisateurs internes',0);
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENUFRONT_SMARTPHONE','iphone_frontoffice.php','chaine','Module de gestion de la barre de menu smartphone pour utilisateurs externes',0);
diff --git a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql
index 3d2109baa14..00e52b04d23 100755
--- a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql
+++ b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql
@@ -11,3 +11,11 @@
--
ALTER TABLE llx_c_actioncomm add COLUMN position integer NOT NULL DEFAULT 0;
+
+-- Delete old constants
+DELETE from llx_const where NAME = 'MAIN_MENU_BARRETOP';
+DELETE from llx_const where NAME = 'MAIN_MENUFRONT_BARRETOP';
+DELETE from llx_const where NAME = 'MAIN_MENU_BARRELEFT';
+DELETE from llx_const where NAME = 'MAIN_MENUFRONT_BARRELEFT';
+
+
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 60bf46ef098..576fc44c332 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -669,7 +669,7 @@ if (! empty($_GET["theme"]))
// Define menu manager to use
if (empty($user->societe_id)) // If internal user or not defined
{
- $conf->top_menu=$conf->global->MAIN_MENU_BARRETOP;
+ $conf->top_menu=$conf->global->MAIN_MENU_STANDARD;
$conf->smart_menu=$conf->global->MAIN_MENU_SMARTPHONE;
// For backward compatibility
if ($conf->top_menu == 'eldy.php') $conf->top_menu='eldy_backoffice.php';
@@ -677,7 +677,7 @@ if (empty($user->societe_id)) // If internal user or not defined
}
else // If external user
{
- $conf->top_menu=$conf->global->MAIN_MENUFRONT_BARRETOP;
+ $conf->top_menu=$conf->global->MAIN_MENUFRONT_STANDARD;
$conf->smart_menu=$conf->global->MAIN_MENUFRONT_SMARTPHONE;
// For backward compatibility
if ($conf->top_menu == 'eldy.php') $conf->top_menu='eldy_frontoffice.php';
diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php
index 4f78c479f62..4cb9c7ae9b4 100644
--- a/htdocs/user/param_ihm.php
+++ b/htdocs/user/param_ihm.php
@@ -92,7 +92,7 @@ if ($_POST["action"] == 'update' && ($caneditfield || $user->admin))
if ($_POST["check_MAIN_LANG_DEFAULT"]=="on") $tabparam["MAIN_LANG_DEFAULT"]=$_POST["main_lang_default"];
else $tabparam["MAIN_LANG_DEFAULT"]='';
- $tabparam["MAIN_MENU_BARRETOP"]=$_POST["main_menu_barretop"];
+ $tabparam["MAIN_MENU_STANDARD"]=$_POST["MAIN_MENU_STANDARD"];
if ($_POST["check_SIZE_LISTE_LIMIT"]=="on") $tabparam["MAIN_SIZE_LISTE_LIMIT"]=$_POST["main_size_liste_limit"];
else $tabparam["MAIN_SIZE_LISTE_LIMIT"]='';