From 2912ccded27118a5a35292e0021cb2b445ee991f Mon Sep 17 00:00:00 2001 From: janschoenherr Date: Sun, 31 Dec 2023 09:39:30 +0100 Subject: [PATCH] Fix `function` parameter lost during redirect (#42315) * Fix `function` parameter lost during redirect Currently if you are switching the menu filter in the menu item select modal, the function parameter will be lost on redirect. * Move function parameter to form url * Remove hidden input --- administrator/components/com_menus/tmpl/items/modal.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/administrator/components/com_menus/tmpl/items/modal.php b/administrator/components/com_menus/tmpl/items/modal.php index 0943ac02a5fc2..dd11a10cb5e53 100644 --- a/administrator/components/com_menus/tmpl/items/modal.php +++ b/administrator/components/com_menus/tmpl/items/modal.php @@ -33,14 +33,14 @@ $editor = $app->getInput()->getCmd('editor', ''); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); -$link = 'index.php?option=com_menus&view=items&layout=modal&tmpl=component&' . Session::getFormToken() . '=1'; +$link = 'index.php?option=com_menus&view=items&layout=modal&tmpl=component&' . Session::getFormToken() . '=1&function=' . $function; $multilang = Multilanguage::isEnabled(); if (!empty($editor)) { // This view is used also in com_menus. Load the xtd script only if the editor is set! $this->document->addScriptOptions('xtd-menus', ['editor' => $editor]); $onclick = "jSelectMenuItem"; - $link = 'index.php?option=com_menus&view=items&layout=modal&tmpl=component&editor=' . $editor . '&' . Session::getFormToken() . '=1'; + $link = 'index.php?option=com_menus&view=items&layout=modal&tmpl=component&editor=' . $editor . '&' . Session::getFormToken() . '=1&function=' . $function; } ?>
@@ -186,7 +186,6 @@ -