aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--graph.php2
-rw-r--r--type/Base.class.php10
2 files changed, 7 insertions, 5 deletions
diff --git a/graph.php b/graph.php
index dadb2c5..0b7cee5 100644
--- a/graph.php
+++ b/graph.php
@@ -86,7 +86,7 @@ if (isset($plugin_json[$type]['vertical'])) {
86} 86}
87 87
88if (isset($plugin_json[$type]['rrdtool_opts'])) { 88if (isset($plugin_json[$type]['rrdtool_opts'])) {
89 $obj->rrdtool_opts = $plugin_json[$type]['rrdtool_opts']; 89 $obj->rrdtool_opts[] = $plugin_json[$type]['rrdtool_opts'];
90} 90}
91 91
92if (isset($plugin_json[$type]['datasize']) and $plugin_json[$type]['datasize']) 92if (isset($plugin_json[$type]['datasize']) and $plugin_json[$type]['datasize'])
diff --git a/type/Base.class.php b/type/Base.class.php
index 5af4c29..b74c1b1 100644
--- a/type/Base.class.php
+++ b/type/Base.class.php
@@ -5,7 +5,7 @@
5class Type_Base { 5class Type_Base {
6 var $datadir; 6 var $datadir;
7 var $rrdtool; 7 var $rrdtool;
8 var $rrdtool_opts; 8 var $rrdtool_opts = array();
9 var $cache; 9 var $cache;
10 var $args; 10 var $args;
11 var $seconds; 11 var $seconds;
@@ -36,7 +36,8 @@ class Type_Base {
36 function __construct($config, $_get) { 36 function __construct($config, $_get) {
37 $this->datadir = $config['datadir']; 37 $this->datadir = $config['datadir'];
38 $this->rrdtool = $config['rrdtool']; 38 $this->rrdtool = $config['rrdtool'];
39 $this->rrdtool_opts = $config['rrdtool_opts']; 39 if (!empty($config['rrdtool_opts']))
40 $this->rrdtool_opts[] = $config['rrdtool_opts'];
40 $this->cache = $config['cache']; 41 $this->cache = $config['cache'];
41 $this->parse_get($_get); 42 $this->parse_get($_get);
42 $this->rrd_title = sprintf( 43 $this->rrd_title = sprintf(
@@ -253,8 +254,9 @@ class Type_Base {
253 default: 254 default:
254 break; 255 break;
255 } 256 }
256 if ($this->rrdtool_opts != '') 257 if (!empty($this->rrdtool_opts))
257 $rrdgraph[] = $this->rrdtool_opts; 258 foreach($this->rrdtool_opts as $opt)
259 $rrdgraph[] = $opt;
258 if ($this->graph_smooth) 260 if ($this->graph_smooth)
259 $rrdgraph[] = '-E'; 261 $rrdgraph[] = '-E';
260 if ($this->base) 262 if ($this->base)