From 424818af682415d3601742498cb778f385ada4ea Mon Sep 17 00:00:00 2001 From: Balfear Date: Fri, 16 Feb 2024 15:26:15 +0300 Subject: [PATCH] Fix hardcoded url --- config/application.php | 4 ++-- lib/Flux/Template.php | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/application.php b/config/application.php index 64a614ae..b3f73085 100644 --- a/config/application.php +++ b/config/application.php @@ -254,8 +254,8 @@ //'ForumLabel' => array('module' => 'forums'), // Built-in forum link 'NewsLabel' => array('module' => 'news'), // Sample items for pages function. - 'DownloadsLabel' => array('module' => 'pages','action'=>'content&path=downloads'), - 'RulesLabel' => array('module' => 'pages','action'=>'content&path=rules'), + 'DownloadsLabel' => array('module' => 'pages','action'=>'content','param'=>array('path'=>'downloads')), + 'RulesLabel' => array('module' => 'pages','action'=>'content','param'=>array('path'=>'rules')), // End sample items for pages function. ), 'AccountLabel' => array( diff --git a/lib/Flux/Template.php b/lib/Flux/Template.php index 685659b2..577c6f0f 100644 --- a/lib/Flux/Template.php +++ b/lib/Flux/Template.php @@ -434,6 +434,7 @@ public function getMenuItems($adminMenus = false) foreach ($menu as $menuName => $menuItem) { $module = array_key_exists('module', $menuItem) ? $menuItem['module'] : false; $action = array_key_exists('action', $menuItem) ? $menuItem['action'] : $defaultAction; + $param = array_key_exists('param', $menuItem) ? $menuItem['param'] : array(); $exturl = array_key_exists('exturl', $menuItem) ? $menuItem['exturl'] : null; if ($adminMenus) { @@ -443,7 +444,7 @@ public function getMenuItems($adminMenus = false) 'exturl' => null, 'module' => $module, 'action' => $action, - 'url' => $this->url($module, $action) + 'url' => $this->url($module, $action, $param) ); } } @@ -467,7 +468,7 @@ public function getMenuItems($adminMenus = false) 'exturl' => null, 'module' => $module, 'action' => $action, - 'url' => $this->url($module, $action) + 'url' => $this->url($module, $action, $param) ); } }