Fix lang property on database menu entry was not propagated

This commit is contained in:
Laurent Destailleur 2020-06-07 19:25:25 +02:00
parent 2a1d547267
commit 81c80b254e
3 changed files with 5 additions and 3 deletions

View File

@ -52,7 +52,7 @@ class Menu
* Add a menu entry into this->liste (at end)
*
* @param string $url Url to follow on click (does not include DOL_URL_ROOT)
* @param string $titre Label of menu to add
* @param string $titre Label of menu to add. The value must already be translated.
* @param integer $level Level of menu to add
* @param int $enabled Menu active or not (0=Not active, 1=Active, 2=Active but grey)
* @param string $target Target link
@ -75,7 +75,7 @@ class Menu
*
* @param int $idafter Array key after which inserting new entry
* @param string $url Url to follow on click
* @param string $titre Label of menu to add
* @param string $titre Label of menu to add. The value must already be translated.
* @param integer $level Level of menu to add
* @param int $enabled Menu active or not
* @param string $target Target link

View File

@ -725,6 +725,7 @@ class Menubase
$tabMenu[$b]['mainmenu'] = $menu['mainmenu'];
$tabMenu[$b]['leftmenu'] = $menu['leftmenu'];
$tabMenu[$b]['perms'] = $perms;
$tabMenu[$b]['langs'] = $menu['langs'];
$tabMenu[$b]['enabled'] = $enabled;
$tabMenu[$b]['type'] = $menu['type'];
//$tabMenu[$b]['langs'] = $menu['langs'];

View File

@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
* @param DoliDB $db Database handler
* @param string $atarget Target (Example: '' or '_top')
* @param int $type_user 0=Menu for backoffice, 1=Menu for front office
* @param array $tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty)
* @param array $tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty). For eldy menu, it contains menu entries loaded from database.
* @param Menu $menu Object Menu to return back list of menu entries
* @param int $noout 1=Disable output (Initialise &$menu only).
* @param string $mode 'top', 'topnb', 'left', 'jmobile'
@ -49,6 +49,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
$mainmenu = (empty($_SESSION["mainmenu"]) ? '' : $_SESSION["mainmenu"]);
$leftmenu = (empty($_SESSION["leftmenu"]) ? '' : $_SESSION["leftmenu"]);
$id = 'mainmenu';
$listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);