mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 17:02:19 +00:00
Code Quality
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
if (!isset($menu)) {
|
||||
$menu = [];
|
||||
if (property_exists($this->router, 'menu') && $this->router->menu && property_exists($this->router->menu, 'children')) {
|
||||
$menu = $this->router->menu->children;
|
||||
}
|
||||
if (!isset($menu)) {
|
||||
$menu = [];
|
||||
if (property_exists($this->router, 'menu') && $this->router->menu && property_exists($this->router->menu, 'children')) {
|
||||
$menu = $this->router->menu->children;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -42,9 +42,9 @@
|
||||
<div id="nav-main-menu" class="collapse collapse-horizontal show">
|
||||
<div>
|
||||
<?php
|
||||
foreach ($menu as $entry) {
|
||||
$this->load->view('templates/CISHMVC-Menu/Entry', ['entry' => $entry, 'menu_id' => 'menu']);
|
||||
}
|
||||
foreach ($menu as $entry) {
|
||||
$this->load->view('templates/CISHMVC-Menu/Entry', ['entry' => $entry, 'menu_id' => 'menu']);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -46,7 +46,7 @@ if (property_exists($entry, 'path')) {
|
||||
</div>
|
||||
<?php } ?>
|
||||
<ul id="<?= $menu_id; ?>" class="nav w-100 collapse<?= $menu_open ? ' show' : ''; ?>">
|
||||
<?php foreach ($entry->children as $id => $child)
|
||||
<?php foreach ($entry->children as $id => $child)
|
||||
$this->load->view('templates/CISHMVC-Menu/Entry', ['content_id' => $id, 'entry' => $child, 'menu_id' => $menu_id, 'path' => $path]);
|
||||
?>
|
||||
</ul>
|
||||
|
||||
@@ -16,4 +16,4 @@ $includesArray = array(
|
||||
|
||||
</main>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer', $includesArray); ?>
|
||||
<?php $this->load->view('templates/FHC-Footer', $includesArray); ?>
|
||||
|
||||
@@ -4,7 +4,7 @@ if (is_array($entry) && isset($entry['content_id']))
|
||||
$menu_id .= '-' . $entry->content_id;
|
||||
|
||||
switch ($entry->template_kurzbz) {
|
||||
case 'redirect': {
|
||||
case 'redirect':
|
||||
$url = '';
|
||||
$target = '';
|
||||
$xml = new DOMDocument();
|
||||
@@ -15,7 +15,7 @@ switch ($entry->template_kurzbz) {
|
||||
$url = $xml->getElementsByTagName('url')->item(0)->nodeValue;
|
||||
// TODO(chris): get params
|
||||
if (isset($params) && is_array($params))
|
||||
foreach ($params as $key=>$value)
|
||||
foreach ($params as $key => $value)
|
||||
$url = str_replace('$' . $key, addslashes($value), $url);
|
||||
if ($xml->getElementsByTagName('target')->item(0))
|
||||
$target = $xml->getElementsByTagName('target')->item(0)->nodeValue;
|
||||
@@ -30,14 +30,15 @@ switch ($entry->template_kurzbz) {
|
||||
|
||||
$this->load->view('templates/CISHTML-Menu/EntryBase', ['entry' => $entry, 'menu_id' => $menu_id, 'link' => $url, 'target' => $target]);
|
||||
break;
|
||||
}
|
||||
case 'include': {
|
||||
case 'include':
|
||||
$this->load->view('templates/CISHTML-Menu/EntryInclude', ['entry' => $entry, 'menu_id' => $menu_id]);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
$this->load->view('templates/CISHTML-Menu/EntryBase', ['entry' => $entry, 'menu_id' => $menu_id, 'link' => site_url('/CisHtml/Cms/content/' . $entry->content_id)]);
|
||||
default:
|
||||
$this->load->view('templates/CISHTML-Menu/EntryBase', [
|
||||
'entry' => $entry,
|
||||
'menu_id' => $menu_id,
|
||||
'link' => site_url('/CisHtml/Cms/content/' . $entry->content_id)
|
||||
]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user