fix permissions on device_port_* graphs (woo, we now have some graph security!) and fix some bugs with graph naming

git-svn-id: http://www.observium.org/svn/observer/trunk@1596 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-08-01 00:38:01 +00:00
parent 09d0f4553d
commit 90833776ee
15 changed files with 34 additions and 137 deletions

View File

@@ -238,7 +238,7 @@ function generate_if_link($args, $text = NULL)
$graph_array['height'] = "100";
$graph_array['width'] = "340";
$graph_array['from'] = $config['day'];
$graph_array['port'] = $args['interface_id'];
$graph_array['id'] = $args['interface_id'];
$content .= generate_graph_tag($graph_array);
$graph_array['from'] = $config['week'];
$content .= generate_graph_tag($graph_array);
@@ -261,7 +261,7 @@ function generate_if_link($args, $text = NULL)
function generate_port_thumbnail($args)
{
if(!$args['bg']) { $args['bg'] = "FFFFF"; }
$args['content'] = "<img src='graph.php?type=".$args['graph_type']."&subtype=".$args['graph_subtype']."&id=".$args['interface_id']."&from=".$args['from']."&to=".$args['to']."&width=".$args['width']."&height=".$args['height']."&legend=no&bg=".$args['bg']."'>";
$args['content'] = "<img src='graph.php?type=".$args['graph_type']."&id=".$args['interface_id']."&from=".$args['from']."&to=".$args['to']."&width=".$args['width']."&height=".$args['height']."&legend=no&bg=".$args['bg']."'>";
$output = generate_if_link($args, $args['content']);
echo $output;
}