From e6f0b8cacea083abf8d8aa31f1ce4779dd1508b5 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sun, 10 Aug 2014 14:53:39 +0200 Subject: type/base: fix undefined variable rrd_url when graph_type != canvas --- type/Base.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'type') diff --git a/type/Base.class.php b/type/Base.class.php index c47aba2..3bda273 100644 --- a/type/Base.class.php +++ b/type/Base.class.php @@ -149,11 +149,13 @@ class Type_Base { function parse_filename($file) { if ($this->graph_type == 'canvas') { $file = str_replace($this->datadir . '/', '', $file); - $rrd_url = str_replace('{file}', $file, $this->rrd_url); - $rrd_url = str_replace('{file_escaped}', - urlencode($file), $rrd_url); + $file = str_replace( + array('{file}', '{file_escaped}'), + array($file, urlencode($file)), + $this->rrd_url + ); } - return $this->rrd_escape($rrd_url); + return $this->rrd_escape($file); } function rrd_files() { -- cgit v1.1