Fix coding style part 2

This commit is contained in:
Job Snijders
2015-07-15 11:04:22 +02:00
parent ad9590df9b
commit d8693f05ae
733 changed files with 37338 additions and 33926 deletions
+14 -13
View File
@@ -13,24 +13,25 @@
*/
$rrd_list = array();
$prefix = rrd_name($device['hostname'], array($subtype, ""), "");
foreach (glob($prefix."*.rrd") as $filename) {
$prefix = rrd_name($device['hostname'], array($subtype, ''), '');
foreach (glob($prefix.'*.rrd') as $filename) {
// find out what * expanded to
$globpart = str_replace($prefix, '', $filename); // take off the prefix
$instance = substr($globpart, 0, -4); // take off ".rrd"
$ds = array();
$mibparts = explode("-", $subtype);
$mibvar = end($mibparts);
$ds['ds'] = name_shorten($mibvar);
$ds['descr'] = "$mibvar-$instance";
$globpart = str_replace($prefix, '', $filename);
// take off the prefix
$instance = substr($globpart, 0, -4);
// take off ".rrd"
$ds = array();
$mibparts = explode('-', $subtype);
$mibvar = end($mibparts);
$ds['ds'] = name_shorten($mibvar);
$ds['descr'] = "$mibvar-$instance";
$ds['filename'] = $filename;
$rrd_list[] = $ds;
$rrd_list[] = $ds;
}
$colours = 'mixed';
$scale_min = "0";
$scale_min = '0';
$nototal = 0;
$simple_rrd = true;
include("includes/graphs/generic_multi_line.inc.php");
require 'includes/graphs/generic_multi_line.inc.php';