From f21e94d918018aa0bf38e9a1270564b1fcb0ce07 Mon Sep 17 00:00:00 2001 From: robert Date: Fri, 20 May 2005 12:47:30 +0000 Subject: [PATCH] allow update function to feed us 'L' and we replace it with the last recorded value --- include/classes/rrdstat.php-class | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/classes/rrdstat.php-class b/include/classes/rrdstat.php-class index 7810b78..c0d7520 100644 --- a/include/classes/rrdstat.php-class +++ b/include/classes/rrdstat.php-class @@ -335,6 +335,13 @@ class rrdstat { $upvals[] = is_null($val)?'U':$val; } } + if (in_array('L', $upvals)) { + // for at least one value, we need to set the same as the last recorded value + $lastvals = $this->fetch(); + foreach (array_keys($upvals, 'L') as $akey) { + $upvals[$akey] = $lastvals[$akey]; + } + } $return = null; if (count($upvals)) { $update_cmd = 'rrdtool update '.$this->rrd_file.' N:'.implode(':', $upvals); -- 2.35.3