From: robert Date: Tue, 10 May 2005 15:07:21 +0000 (+0000) Subject: support graph url on page settings X-Git-Url: https://git-public.kairo.at/?a=commitdiff_plain;h=253ead9f08505693b3a6d0cd1d83724e20be9586;p=php-utility-classes.git support graph url on page settings --- 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'])) {