Fix: Left menu are hidden to external users
This commit is contained in:
parent
8cc8717b39
commit
ba15630483
@ -93,7 +93,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after)
|
||||
|
||||
$menuArbo = new Menubase($db,'auguria','left');
|
||||
$overwritemenufor = $menuArbo->listeMainmenu();
|
||||
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,0,'auguria');
|
||||
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,($user->societe_id?1:0),'auguria');
|
||||
|
||||
/*
|
||||
* Menu AUTRES (Pour les menus du haut qui ne serait pas geres)
|
||||
|
||||
@ -853,7 +853,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
||||
// Add other mainmenu to the list of menu to overwrite pre.inc.php
|
||||
$overwritemenumore=array('home','companies','members','products','suppliers','commercial','accountancy','agenda','project','tools','ecm');
|
||||
$overwritemenufor=array_merge($overwritemenumore, $overwritemenufor);
|
||||
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,0,'eldy');
|
||||
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,($user->societe_id?1:0),'eldy');
|
||||
|
||||
/*
|
||||
* Menu AUTRES (Pour les menus du haut qui ne serait pas geres)
|
||||
|
||||
@ -30,9 +30,9 @@
|
||||
*
|
||||
* @param $db
|
||||
* @param $atarget
|
||||
* @param $hideifnotallowed
|
||||
* @param $type_user 0=Internal,1=External,2=All
|
||||
*/
|
||||
function print_auguria_menu($db,$atarget,$hideifnotallowed)
|
||||
function print_auguria_menu($db,$atarget,$type_user)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/menubase.class.php");
|
||||
|
||||
@ -44,7 +44,7 @@ function print_auguria_menu($db,$atarget,$hideifnotallowed)
|
||||
$_SESSION["leftmenuopened"]="";
|
||||
|
||||
$menuArbo = new Menubase($db,'auguria','top');
|
||||
$tabMenu = $menuArbo->menuTopCharger($hideifnotallowed,$_SESSION['mainmenu'], 'auguria');
|
||||
$tabMenu = $menuArbo->menuTopCharger($type_user,$_SESSION['mainmenu'], 'auguria');
|
||||
|
||||
print_start_menu_array_auguria();
|
||||
|
||||
@ -86,7 +86,7 @@ function print_auguria_menu($db,$atarget,$hideifnotallowed)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $hideifnotallowed)
|
||||
if (! $type_user)
|
||||
{
|
||||
print_start_menu_entry_auguria($idsel);
|
||||
print '<div class="mainmenu '.$idsel.'"><span class="mainmenu_'.$idsel.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
|
||||
@ -29,9 +29,9 @@
|
||||
*
|
||||
* @param $db
|
||||
* @param $atarget
|
||||
* @param $hideifnotallowed
|
||||
* @param $type_user 0=Internal,1=External,2=All
|
||||
*/
|
||||
function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
||||
function print_eldy_menu($db,$atarget,$type_user)
|
||||
{
|
||||
global $user,$conf,$langs,$dolibarr_main_db_name;
|
||||
|
||||
@ -96,7 +96,7 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $hideifnotallowed)
|
||||
if (! $type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
@ -142,7 +142,7 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $hideifnotallowed)
|
||||
if (! $type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
@ -183,7 +183,7 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $hideifnotallowed)
|
||||
if (! $type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
@ -226,7 +226,7 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $hideifnotallowed)
|
||||
if (! $type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
@ -268,7 +268,7 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $hideifnotallowed)
|
||||
if (! $type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
@ -309,7 +309,7 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $hideifnotallowed)
|
||||
if (! $type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
@ -350,7 +350,7 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $hideifnotallowed)
|
||||
if (! $type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
@ -417,7 +417,7 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $hideifnotallowed)
|
||||
if (! $type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
@ -435,7 +435,7 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
||||
|
||||
$menuArbo = new Menubase($db,'eldy','top');
|
||||
|
||||
$tabMenu = $menuArbo->menuTopCharger($hideifnotallowed,$_SESSION['mainmenu'],'eldy');
|
||||
$tabMenu = $menuArbo->menuTopCharger($type_user,$_SESSION['mainmenu'],'eldy');
|
||||
|
||||
for($i=0; $i<count($tabMenu); $i++)
|
||||
{
|
||||
@ -478,7 +478,7 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $hideifnotallowed)
|
||||
if (! $type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user