From 253ead9f08505693b3a6d0cd1d83724e20be9586 Mon Sep 17 00:00:00 2001 From: robert Date: Tue, 10 May 2005 15:07:21 +0000 Subject: [PATCH] support graph url on page settings --- include/classes/rrdstat.php-class | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/classes/rrdstat.php-class b/include/classes/rrdstat.php-class index 3d7b84d..18bd786 100644 --- a/include/classes/rrdstat.php-class +++ b/include/classes/rrdstat.php-class @@ -517,10 +517,20 @@ class rrdstat { $gmeta['info'][] = $gline; } } + if (is_null($gfilename)) { $gfilename = $basename.(!is_null($g_sub)?'-'.$g_sub:'').'-'.$tframe.'.png'; } + if (isset($pconf['graph_url'])) { + $gURL = $pconf['graph_url']; + $fname = str_replace('%f', basename($gfilename), $gURL); + $fname = str_replace('%p', $gfilename, $gURL); + if (substr($gURL, -1) == '/') { $gURL .= $gfilename; } + } + else { + $gURL = $gfilename; + } $out .= '
'; // $out .= '

'.nl2br($ret).'

'; $out .= '

'.$gtitle[$tframe].'

'; - $out .= ''; if (isset($gmeta['data']) && count($gmeta['data'])) { -- 2.43.0