Skip to content
Snippets Groups Projects
Commit 2852cbd2 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

do not create unecessary references for single use objects

parent 4887c154
No related branches found
No related tags found
No related merge requests found
......@@ -92,11 +92,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
<h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
<div class="tools">
<ul>
<?php
$menu = new \dokuwiki\Menu\DetailMenu();
echo $menu->getListItems();
unset($menu);
?>
<?php echo (new \dokuwiki\Menu\DetailMenu())->getListItems(); ?>
</ul>
</div>
</div>
......
......@@ -73,11 +73,7 @@ $showSidebar = $hasSidebar && ($ACT=='show');
<h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
<div class="tools">
<ul>
<?php
$menu = new \dokuwiki\Menu\PageMenu();
echo $menu->getListItems();
unset($menu);
?>
<?php echo (new \dokuwiki\Menu\PageMenu())->getListItems(); ?>
</ul>
</div>
</div>
......
......@@ -46,9 +46,7 @@ if (!defined('DOKU_INC')) die();
tpl_userinfo(); /* 'Logged in as ...' */
echo '</li>';
}
$menu = new \dokuwiki\Menu\UserMenu();
echo $menu->getListItems('action ');
unset($menu);
echo (new \dokuwiki\Menu\UserMenu())->getListItems('action');
?>
</ul>
</div>
......@@ -59,18 +57,10 @@ if (!defined('DOKU_INC')) die();
<h3 class="a11y"><?php echo $lang['site_tools']; ?></h3>
<?php tpl_searchform(); ?>
<div class="mobileTools">
<?php
$menu = new \dokuwiki\Menu\MobileMenu();
echo $menu->getDropdown($lang['tools']);
unset($menu);
?>
<?php echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']); ?>
</div>
<ul>
<?php
$menu = new \dokuwiki\Menu\SiteMenu();
echo $menu->getListItems('action ', false);
unset($menu);
?>
<?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false); ?>
</ul>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment