Fix PHP warnings and notices
This commit is contained in:
parent
be9610cd98
commit
a4ecd1bff7
3
lib.php
3
lib.php
|
@ -26,6 +26,7 @@ $smarty = new Smarty();
|
||||||
$smarty->template_dir = 'tpl';
|
$smarty->template_dir = 'tpl';
|
||||||
$smarty->compile_dir = 'tpl_c';
|
$smarty->compile_dir = 'tpl_c';
|
||||||
$smarty->registerPlugin('function', 'treelist', 'print_tree');
|
$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;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_tree($params, &$smarty) {
|
//function print_tree($params, &$smarty) {
|
||||||
|
function print_tree($params, Smarty_Internal_Template $template) {
|
||||||
if (empty($params['level'])) {
|
if (empty($params['level'])) {
|
||||||
$level = 0;
|
$level = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
3
node.php
3
node.php
|
@ -15,7 +15,8 @@ if(isset($_GET['subnet_id'])) {
|
||||||
$subnet_view = "WHERE node.subnet_id=" . $subnet_id;
|
$subnet_view = "WHERE node.subnet_id=" . $subnet_id;
|
||||||
$smarty->assign("subnet_id", $subnet_id);
|
$smarty->assign("subnet_id", $subnet_id);
|
||||||
} else {
|
} else {
|
||||||
$smarty->assign("subnet_id", "");
|
$smarty->assign("subnet_id", '');
|
||||||
|
$subnet_view = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="header">
|
<td class="header">
|
||||||
<img class="icon" src="images/network-ethernet.png" alt="" />
|
<img class="icon" src="images/network-ethernet.png" alt="" />
|
||||||
{$lang_nodes} ({$node|@count})
|
{$lang_nodes} ({$nodes|@count})
|
||||||
</td>
|
</td>
|
||||||
<td align="right">
|
<td align="right">
|
||||||
<a href="nodeadd.php?subnet_id={$subnet_id}"><img src="image.php?icon=add" alt="{$lang_node_add}"></a>
|
<a href="nodeadd.php?subnet_id={$subnet_id}"><img src="image.php?icon=add" alt="{$lang_node_add}"></a>
|
||||||
|
|
Loading…
Reference in New Issue