diff --git a/ChangeLog b/ChangeLog
index 88c769928c7..9c17c5b4516 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,17 +2,17 @@ English Dolibarr changelog
***** Changelog for 2.2 compared to 2.1 *****
-- Added more statistics on main page.
-- Added option to add message on login page.
+- Add more statistics on main page.
+- Add option to add message on login page.
- Management of categories for third parties.
-- Adde volume on products properties.
-- Support LDAP authentication.
+- Add volume on products properties.
+- Support for LDAP authentication.
- Full member synchronisation with LDAP database in
fundation module.
- More LDAP fields supported for user synchronization.
- Better logger for install.
- First changes to support UTF8.
-- Added a "forget password" feature.
+- Add a "forget password" feature.
- Setup process can run several migrate files if need
to jump several versions to upgrade.
- Support for webcalendar 1.1 in webcalendar module.
diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php
index f27adbdbe21..73c8b74f150 100644
--- a/htdocs/admin/menus/edit.php
+++ b/htdocs/admin/menus/edit.php
@@ -29,10 +29,18 @@
require("./pre.inc.php");
-
-if (!$user->admin)
+if (! $user->admin)
accessforbidden();
+$menu_handler_top=$conf->global->MAIN_MENU_BARRETOP;
+$menu_handler_left=$conf->global->MAIN_MENU_BARRELEFT;
+$menu_handler_top=eregi_replace('_backoffice\.php','',$menu_handler_top);
+$menu_handler_top=eregi_replace('_frontoffice\.php','',$menu_handler_top);
+$menu_handler_left=eregi_replace('_backoffice\.php','',$menu_handler_left);
+$menu_handler_left=eregi_replace('_frontoffice\.php','',$menu_handler_left);
+
+$menu_handler=$menu_handler_left;
+
/*
* Actions
@@ -40,8 +48,6 @@ if (!$user->admin)
if (isset($_GET["action"]) && $_GET["action"] == 'update')
{
-
-
if(!$_POST['cancel'])
{
@@ -54,10 +60,12 @@ if (isset($_GET["action"]) && $_GET["action"] == 'update')
if($_GET['return'])
{
header("location: index.php");
+ exit;
}
else
{
header("location: edit.php?action=edit&menuId=".$_POST['menuId']);
+ exit;
}
@@ -65,89 +73,70 @@ if (isset($_GET["action"]) && $_GET["action"] == 'update')
if (isset($_GET["action"]) && $_GET["action"] == 'add')
{
-
- if($_POST['cancel'])
+ if ($_POST['cancel'])
{
header("location:index.php");
+ exit;
}
- else
+
+ $error=0;
+ if (! $error && ! $_POST['handler'])
+ {
+ $mesg='