Rename function to indicate purpose better

This commit is contained in:
Paul Gear
2013-11-26 07:51:39 +10:00
parent 0a51167fe6
commit b1ab8a7d32
4 changed files with 6 additions and 6 deletions

View File

@@ -452,7 +452,7 @@ function generate_port_url($port, $vars=array())
return generate_url(array('page' => 'device', 'device' => $port['device_id'], 'tab' => 'port', 'port' => $port['port_id']), $vars);
}
function generate_port_thumbnail($args)
function print_port_thumbnail($args)
{
if (!$args['bg']) { $args['bg'] = "FFFFFF"; }
$args['content'] = "<img src='graph.php?type=".$args['graph_type']."&amp;id=".$args['port_id']."&amp;from=".$args['from']."&amp;to=".$args['to']."&amp;width=".$args['width']."&amp;height=".$args['height']."&amp;bg=".$args['bg']."'>";

View File

@@ -65,7 +65,7 @@ foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I WHERE P.port_id
foreach ($types as $graph_type)
{
$pw_a['graph_type'] = "port_".$graph_type;
generate_port_thumbnail($pw_a);
print_port_thumbnail($pw_a);
}
}
echo("</td><td></td><td colspan=2>");
@@ -81,7 +81,7 @@ foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I WHERE P.port_id
foreach ($types as $graph_type)
{
$pw_b['graph_type'] = "port_".$graph_type;
generate_port_thumbnail($pw_b);
print_port_thumbnail($pw_b);
}
}

View File

@@ -65,7 +65,7 @@ foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I, devices AS D W
foreach ($types as $graph_type)
{
$pw_a['graph_type'] = "port_".$graph_type;
generate_port_thumbnail($pw_a);
print_port_thumbnail($pw_a);
}
}
echo("</td><td></td><td colspan=2>");
@@ -81,7 +81,7 @@ foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I, devices AS D W
foreach ($types as $graph_type)
{
$pw_b['graph_type'] = "port_".$graph_type;
generate_port_thumbnail($pw_b);
print_port_thumbnail($pw_b);
}
}

View File

@@ -107,7 +107,7 @@ if($_GET['optb'] == "all" ) {
echo("<div style='display: block; padding: 3px; margin: 3px; min-width: 135px; max-width:135px; min-height:75px; max-height:75px;
text-align: center; float: left; background-color: ".$list_colour_b_b.";'>
<div style='font-weight: bold;'>".makeshortif($port['ifDescr'])."</div>");
generate_port_thumbnail($port);
print_port_thumbnail($port);
echo("<div style='font-size: 9px;'>".truncate(short_port_descr($port['ifAlias']), 22, '')."</div>
</div>");
break;