diff --git a/lib.php b/lib.php index b294f1a..c18e020 100644 --- a/lib.php +++ b/lib.php @@ -26,6 +26,7 @@ $smarty = new Smarty(); $smarty->template_dir = 'tpl'; $smarty->compile_dir = 'tpl_c'; $smarty->registerPlugin('function', 'treelist', 'print_tree'); -$smarty->assign("suser_tooltips", $_SESSION['suser_tooltips']); + +$smarty->assign("suser_tooltips", $_SESSION['suser_tooltips'] ?? 'off'); ?> diff --git a/lib/functions.php b/lib/functions.php index 96cb7e3..dbb09b8 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -141,7 +141,8 @@ function print_tree_rec($tree, $level) { return $output; } -function print_tree($params, &$smarty) { +//function print_tree($params, &$smarty) { +function print_tree($params, Smarty_Internal_Template $template) { if (empty($params['level'])) { $level = 0; } else { diff --git a/node.php b/node.php index c03a421..25fc72f 100644 --- a/node.php +++ b/node.php @@ -15,7 +15,8 @@ if(isset($_GET['subnet_id'])) { $subnet_view = "WHERE node.subnet_id=" . $subnet_id; $smarty->assign("subnet_id", $subnet_id); } else { - $smarty->assign("subnet_id", ""); + $smarty->assign("subnet_id", ''); + $subnet_view = ''; } $query = "SELECT diff --git a/tpl/node.tpl b/tpl/node.tpl index f830586..606f7e7 100644 --- a/tpl/node.tpl +++ b/tpl/node.tpl @@ -2,7 +2,7 @@ - {$lang_nodes} ({$node|@count}) + {$lang_nodes} ({$nodes|@count}) {$lang_node_add}