From 2c5c2a62e10d5aadef9908b03908dffe9c26e2ad Mon Sep 17 00:00:00 2001 From: Ɓukasz Kostka Date: Fri, 15 Aug 2014 00:13:54 +0200 Subject: move " on " suffix in graph title to JSON Closes #101 --- graph.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'graph.php') diff --git a/graph.php b/graph.php index 6206d73..8eec2ec 100644 --- a/graph.php +++ b/graph.php @@ -83,9 +83,11 @@ if (isset($plugin_json[$type]['legend'])) { } if (isset($plugin_json[$type]['title'])) { - $obj->rrd_title = $plugin_json[$type]['title']; - $obj->rrd_title = str_replace('{{PI}}', GET('pi'), $obj->rrd_title); - $obj->rrd_title = str_replace('{{TI}}', GET('ti'), $obj->rrd_title); + $obj->rrd_title = str_replace( + array('{{PI}}', '{{TI}}', '{{HOST}}'), + array(GET('pi'), GET('ti'), GET('h')), + $plugin_json[$type]['title'] + ); } if (isset($plugin_json[$type]['vertical'])) { -- cgit v1.1