X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=blobdiff_plain;f=include%2Fclasses%2Frrdstat.php-class;h=c0d752019505048f97c0ebe4e80e3118cac1bd18;hp=7810b78a369ed6582b6e3f15f118acccacde9804;hb=f21e94d918018aa0bf38e9a1270564b1fcb0ce07;hpb=0ee9d2d05a359533d310338679c7bdd51539fbec;ds=sidebyside 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);