Do not use $menuItemsCount global variable

This commit is contained in:
Dmitriy Simushev 2014-01-21 10:51:36 +00:00
parent 02cda0c1f4
commit 5b964974cd

View File

@ -27,12 +27,12 @@ function tpl_header() { global $page;
} }
function menuseparator() { function menuseparator() {
global $menuItemsCount; static $menu_items_count = 0;
$menuItemsCount++; $menu_items_count++;
if(($menuItemsCount%3) == 0) { echo "</tr><tr>"; } if(($menu_items_count%3) == 0) { echo "</tr><tr>"; }
} }
function tpl_content() { global $page, $menuItemsCount; function tpl_content() { global $page;
?> ?>
<br/> <br/>
@ -56,6 +56,7 @@ function tpl_content() { global $page, $menuItemsCount;
<?php echo getlocal('topMenu.users') ?></a> <?php echo getlocal('topMenu.users') ?></a>
<?php echo getlocal('page_client.pending_users') ?> <?php echo getlocal('page_client.pending_users') ?>
</td> </td>
<?php menuseparator(); ?>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/history.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/history.gif" alt=""/>
@ -63,9 +64,7 @@ function tpl_content() { global $page, $menuItemsCount;
<?php echo getlocal('page_analysis.search.title') ?></a> <?php echo getlocal('page_analysis.search.title') ?></a>
<?php echo getlocal('content.history') ?> <?php echo getlocal('content.history') ?>
</td> </td>
<?php <?php menuseparator(); ?>
$menuItemsCount = 2;
?>
<?php if($page['showstat']) { ?> <?php if($page['showstat']) { ?>
<td class="dashitem"> <td class="dashitem">