aboutsummaryrefslogtreecommitdiff
path: root/htmlreport/gen-html.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2014-07-13 13:05:11 +0200
committerChristian Weiske <cweiske@cweiske.de>2014-07-13 13:05:36 +0200
commit40a9112d1b841b0ac60de102bd7e0a06c3aed070 (patch)
treeb15ed9e2bbc8cc4bbc2d3b414485fcd7affcba89 /htmlreport/gen-html.php
parent56195e5b21309d1de06963162f26a90f90fb4895 (diff)
downloadusb-wde1-tools-40a9112d1b841b0ac60de102bd7e0a06c3aed070.tar.gz
usb-wde1-tools-40a9112d1b841b0ac60de102bd7e0a06c3aed070.zip
support file template array
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) {