Fix PHP warnings and notices

master
Thomas Hooge 1 year ago
parent be9610cd98
commit a4ecd1bff7
  1. 3
      lib.php
  2. 3
      lib/functions.php
  3. 3
      node.php
  4. 2
      tpl/node.tpl

@ -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');
?>

@ -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 {

@ -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

@ -2,7 +2,7 @@
<tr>
<td class="header">
<img class="icon" src="images/network-ethernet.png" alt="" />
{$lang_nodes} ({$node|@count})
{$lang_nodes} ({$nodes|@count})
</td>
<td align="right">
<a href="nodeadd.php?subnet_id={$subnet_id}"><img src="image.php?icon=add" alt="{$lang_node_add}"></a>