mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
Type validation for navigation_shortcode()
This commit is contained in:
@@ -18,28 +18,29 @@
|
|||||||
'alt6' => 6,
|
'alt6' => 6,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$category = 1;
|
||||||
if(is_array($parm) && !empty($parm))
|
$tmpl = 'main';
|
||||||
|
if (!is_array($parm))
|
||||||
|
{
|
||||||
|
$category = isset($types[$parm]) ? $types[$parm] : 1;
|
||||||
|
$tmpl = $parm ?: 'main';
|
||||||
|
}
|
||||||
|
elseif (!empty($parm))
|
||||||
{
|
{
|
||||||
$category = 1;
|
$category = 1;
|
||||||
$tmpl = 'main';
|
$tmpl = 'main';
|
||||||
|
|
||||||
if(!empty($parm['type']))
|
if (!empty($parm['type']))
|
||||||
{
|
{
|
||||||
$cat = $parm['type'];
|
$cat = $parm['type'];
|
||||||
$category = varset($types[$cat], 1);
|
$category = varset($types[$cat], 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($parm['layout']))
|
if (!empty($parm['layout']))
|
||||||
{
|
{
|
||||||
$tmpl= $parm['layout'];
|
$tmpl = $parm['layout'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
$category = varset($types[$parm], 1);
|
|
||||||
$tmpl = vartrue($parm, 'main');
|
|
||||||
}
|
|
||||||
|
|
||||||
$nav = e107::getNav();
|
$nav = e107::getNav();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user