some minor corrections; make this first rrd test really work
authorrobert <robert>
Thu, 26 May 2005 21:24:02 +0000 (21:24 +0000)
committerrobert <robert>
Thu, 26 May 2005 21:24:02 +0000 (21:24 +0000)
include/classes/rrdstat.php-class

index bc41408c5515b9b61e4e418b9e41e737a5548ee6..0cc03ef556fc62aada4882a69cef84bc2c8d6fdf 100644 (file)
@@ -286,7 +286,7 @@ class rrdstat {
 
   function update($upArray = null) {
     // feed new data into RRD
 
   function update($upArray = null) {
     // feed new data into RRD
-    if ($this->status != 'ok') { trigger_error('Cannot update non-writeable file', E_USER_WARNING); return 1; }
+    if ($this->status != 'ok') { trigger_error('Cannot update non-writeable file', E_USER_WARNING); return false; }
     $upvals = array();
     if (isset($this->config_raw['update'])) {
       if (preg_match('/^\s*function\s+{(.*)}\s*$/is', $this->config_raw['update'], $regs)) {
     $upvals = array();
     if (isset($this->config_raw['update'])) {
       if (preg_match('/^\s*function\s+{(.*)}\s*$/is', $this->config_raw['update'], $regs)) {
@@ -366,7 +366,7 @@ class rrdstat {
       $success = false;
     }
     else { $success = true; }
       $success = false;
     }
     else { $success = true; }
-  return ($return_var == 0);
+  return $success;
   }
 
   function fetch($cf = 'AVERAGE', $resolution = null, $start = null, $end = null) {
   }
 
   function fetch($cf = 'AVERAGE', $resolution = null, $start = null, $end = null) {