From 5a138d4c0464b591177cf523ebb8e0603e32d650 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Mon, 28 Dec 2009 15:47:42 +0100 Subject: replace duplicate code by function rrd_options --- type/GenericIO.class.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'type/GenericIO.class.php') diff --git a/type/GenericIO.class.php b/type/GenericIO.class.php index 573abde..e91cb16 100644 --- a/type/GenericIO.class.php +++ b/type/GenericIO.class.php @@ -7,13 +7,7 @@ class Type_GenericIO extends Type_Default { function rrd_gen_graph() { $filename = $this->get_filename(); - $rrdgraph[] = '/usr/bin/rrdtool graph - -a PNG'; - $rrdgraph[] = sprintf('-w %d', is_numeric($this->width) ? $this->width : 400); - $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175); - $rrdgraph[] = '-l 0'; - $rrdgraph[] = sprintf('-t "%s"', $this->rrd_title); - $rrdgraph[] = sprintf('-v "%s"', $this->rrd_vertical); - $rrdgraph[] = sprintf('-s -%d', is_numeric($this->seconds) ? $this->seconds : 86400); + $rrdgraph = $this->rrd_options(); if ($this->scale) $raw = '_raw'; -- cgit v1.1