Skip to content

Commit

Permalink
Fix hardcoded url
Browse files Browse the repository at this point in the history
  • Loading branch information
Balferian committed Feb 16, 2024
1 parent b894415 commit 424818a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 3 additions & 2 deletions lib/Flux/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)
);
}
}
Expand All @@ -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)
);
}
}
Expand Down

0 comments on commit 424818a

Please sign in to comment.