aboutsummaryrefslogtreecommitdiff
path: root/htmlreport/gen-html.php
diff options
context:
space:
mode:
Diffstat (limited to 'htmlreport/gen-html.php')
-rwxr-xr-xhtmlreport/gen-html.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/htmlreport/gen-html.php b/htmlreport/gen-html.php
index 8969e0d..61c94ec 100755
--- a/htmlreport/gen-html.php
+++ b/htmlreport/gen-html.php
@@ -12,6 +12,13 @@ if (!function_exists('rrd_lastupdate')) {
exit(2);
}
+if (!is_array($filetemplate)) {
+ $filetemplate = array_combine(
+ array_keys($names),
+ array_fill(0, count($names), $filetemplate)
+ );
+}
+
$data = array();
foreach ($names as $id => $name) {
$data[$id]['name'] = $name;
@@ -20,7 +27,7 @@ foreach ($names as $id => $name) {
str_replace(
array('{item}', '{id}'),
array($item, $id),
- $filetemplate
+ $filetemplate[$id]
)
);
if ($lu === false) {