commit version 22.12.12447

This commit is contained in:
2023-01-01 22:36:12 -05:00
parent af1b03d79f
commit b948283a96
744 changed files with 620715 additions and 27381 deletions

View File

@ -1,5 +1,4 @@
<?php
/**
* Observium
*
@ -7,21 +6,22 @@
*
* @package observium
* @subpackage graphs
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
*
*/
if (is_numeric($vars['id']))
{
if (is_numeric($vars['id'])) {
$data = dbFetchRow("SELECT * FROM `bgpPeers` WHERE `bgpPeer_id` = ?", array($vars['id']));
$data = dbFetchRow("SELECT * FROM `bgpPeers` WHERE `bgpPeer_id` = ?", [ $vars['id'] ]);
if (is_numeric($data['device_id']) && ($auth || device_permitted($data['device_id'])))
{
if (is_numeric($data['device_id']) && ($auth || device_permitted($data['device_id']))) {
$device = device_by_id_cache($data['device_id']);
$graph_title = $device['hostname'];
$graph_title .= " :: AS" . ($config['web_show_bgp_asdot'] ? bgp_asplain_to_asdot($data['bgpPeerRemoteAs']) : $data['bgpPeerRemoteAs']);
if (!safe_empty($data['astext'])) {
$graph_title .= ' (' . truncate($data['astext']) . ')';
}
$auth = TRUE;
}
}