Improved MAC address formatting

This commit is contained in:
2023-03-11 08:59:59 +01:00
parent 02980bbad5
commit 20b54f5b27
2 changed files with 34 additions and 32 deletions

View File

@@ -231,7 +231,7 @@ $sth = $dbh->prepare($sql);
$sth->execute([$id]);
$node = $sth->fetch(PDO::FETCH_OBJ);
$node->mac = write_mac($node->mac);
$node->mac = write_mac($node->mac, $_SESSION['suser_mac']);
$smarty->assign("node", $node);
// nat
@@ -281,6 +281,7 @@ $sql = "SELECT node_id AS id, node_ip AS ip, node_mac AS mac,
$sth = $dbh->prepare($sql);
$sth->execute([$id]);
$node = $sth->fetch(PDO::FETCH_OBJ);
$node->mac = write_mac($node->mac, $_SESSION['suser_mac']);
$node->flags = explode(',', $node->flags);
$smarty->assign("node", $node);