diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 316c4d5b607..1c14f3de824 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -301,7 +301,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM // Show menu if (empty($noout)) { - $alt=0; + $alt=0; $blockvmenuopened=false; $num=count($menu_array); for ($i = 0; $i < $num; $i++) { @@ -311,6 +311,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM $alt++; if (empty($menu_array[$i]['level']) && $showmenu) { + $blockvmenuopened=true; if (($alt%2==0)) { print '
'."\n"; @@ -344,8 +345,8 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM $url.='mainmenu='.$mainmenu; } - print ''."\n"; - + print ''."\n"; + // Menu niveau 0 if ($menu_array[$i]['level'] == 0) { @@ -379,12 +380,12 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM } } - // If next is a new block or end + // If next is a new block or if there is nothing after if (empty($menu_array[$i+1]['level'])) { if ($showmenu) print ''."\n"; - print "
\n"; + if ($blockvmenuopened) { print "\n"; $blockvmenuopened=false; } } } }