projects
/
php-utility-classes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ee9d2d
)
allow update function to feed us 'L' and we replace it with the last recorded value
author
robert
<robert>
Fri, 20 May 2005 12:47:30 +0000
(12:47 +0000)
committer
robert
<robert>
Fri, 20 May 2005 12:47:30 +0000
(12:47 +0000)
include/classes/rrdstat.php-class
patch
|
blob
|
blame
|
history
diff --git
a/include/classes/rrdstat.php-class
b/include/classes/rrdstat.php-class
index 7810b78a369ed6582b6e3f15f118acccacde9804..c0d752019505048f97c0ebe4e80e3118cac1bd18 100644
(file)
--- 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);