Files
librenms-librenms/html/includes/graphs/sensor/auth.inc.php
Tom Laermans 3133a5b2fd fix graphs after r1750, sigh
git-svn-id: http://www.observium.org/svn/observer/trunk@1754 61d68cd4-352d-0410-923a-c4978735b2b8
2010-12-02 18:12:50 +00:00

21 lines
675 B
PHP

<?php
if(is_numeric($id))
{
$sensor = mysql_fetch_assoc(mysql_query("SELECT * FROM sensors WHERE sensor_id = '".mres($id)."'"));
if(is_numeric($sensor['device_id']) && ($config['allow_unauth_graphs'] || device_permitted($sensor['device_id'])))
{
$device = device_by_id_cache($sensor['device_id']);
### This doesn't quite work for all yet.
$rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename($sensor['sensor_class']."-" . $sensor['sensor_type'] . "-".$sensor['sensor_index'].".rrd");
$title = generate_device_link($device);
$title .= " :: Sensor :: " . htmlentities($sensor['sensor_descr']);
$auth = TRUE;
}
}
?>