Menu: ignore special params when comparing URLs

This fixes issues on login with dashboard != dashboard?renderLayout
and similar

refs #6699
This commit is contained in:
Thomas Gelf 2014-08-19 10:06:14 +02:00
parent 512e7d516b
commit 5a6b5172e6
2 changed files with 4 additions and 2 deletions

View File

@ -18,7 +18,9 @@ class LayoutController extends ActionController
*/
public function menuAction()
{
$this->view->menuRenderer = new MenuRenderer(Menu::fromConfig()->order(), Url::fromRequest()->getRelativeUrl());
$this->view->menuRenderer = new MenuRenderer(
Menu::fromConfig()->order(), Url::fromRequest()->without('renderLayout')->getRelativeUrl()
);
}
/**

View File

@ -14,5 +14,5 @@ if (! $this->auth()->isAuthenticated()) {
<form action="<?= $this->href('search') ?>" method="get" role="search">
<input type="text" name="q" class="search autofocus" placeholder="<?= $this->translate('Search...') ?>" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
</form>
<?= new MenuRenderer(Menu::fromConfig()->order(), Url::fromRequest()->getRelativeUrl()); ?>
<?= new MenuRenderer(Menu::fromConfig()->order(), Url::fromRequest()->without('renderLayout')->getRelativeUrl()); ?>
</div>