mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Additional fix to previous commit
This commit is contained in:
parent
d639e77d04
commit
11cee81c5f
@ -326,14 +326,22 @@ if(isset($config['boxes']))
|
|||||||
<?php
|
<?php
|
||||||
$menus = get_template_menus();
|
$menus = get_template_menus();
|
||||||
|
|
||||||
$countElements = count($config['menu_categories']);
|
$countElements = 0;
|
||||||
|
foreach($config['menu_categories'] as $id => $cat) {
|
||||||
|
if (!isset($menus[$id]) || ($id == MENU_CATEGORY_SHOP && !setting('core.gifts_system'))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$countElements++;
|
||||||
|
}
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach($config['menu_categories'] as $id => $cat) {
|
foreach($config['menu_categories'] as $id => $cat) {
|
||||||
$i++;
|
|
||||||
|
|
||||||
if(!isset($menus[$id]) || ($id == MENU_CATEGORY_SHOP && !setting('core.gifts_system'))) {
|
if(!isset($menus[$id]) || ($id == MENU_CATEGORY_SHOP && !setting('core.gifts_system'))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$i++;
|
||||||
?>
|
?>
|
||||||
<div id='<?php echo $cat['id']; ?>' class='menuitem'>
|
<div id='<?php echo $cat['id']; ?>' class='menuitem'>
|
||||||
<span onClick="MenuItemAction('<?php echo $cat['id']; ?>')">
|
<span onClick="MenuItemAction('<?php echo $cat['id']; ?>')">
|
||||||
@ -373,7 +381,7 @@ foreach($config['menu_categories'] as $id => $cat) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if($id == MENU_CATEGORY_SHOP || (!setting('core.gifts_system') && $i == $countElements - 1)) {
|
if($id == MENU_CATEGORY_SHOP || (!setting('core.gifts_system') && $i == $countElements)) {
|
||||||
?>
|
?>
|
||||||
<div id='MenuBottom' style='background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);'></div>
|
<div id='MenuBottom' style='background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);'></div>
|
||||||
<?php
|
<?php
|
||||||
|
Loading…
x
Reference in New Issue
Block a user