summaryrefslogtreecommitdiff
path: root/net-mgmt/cacti88/files/patch-lib__functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt/cacti88/files/patch-lib__functions.php')
-rw-r--r--net-mgmt/cacti88/files/patch-lib__functions.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/net-mgmt/cacti88/files/patch-lib__functions.php b/net-mgmt/cacti88/files/patch-lib__functions.php
new file mode 100644
index 000000000000..7fd717018708
--- /dev/null
+++ b/net-mgmt/cacti88/files/patch-lib__functions.php
@@ -0,0 +1,15 @@
+--- lib/functions.php.orig 2016-05-08 14:46:52 UTC
++++ lib/functions.php
+@@ -670,8 +670,10 @@ function update_host_status($status, $ho
+ $issue_log_message = false;
+ $ping_failure_count = read_config_option("ping_failure_count");
+ $ping_recovery_count = read_config_option("ping_recovery_count");
+- $hosts[$host_id]["status_fail_date"] = '0000-00-00 00:00:00';
+- $hosts[$host_id]["status_rec_date"] = '0000-00-00 00:00:00';
++ if ((!isset($hosts[$host_id]["status_fail_date"])) || ($hosts[$host_id]["status_fail_date"] == ""))
++ $hosts[$host_id]["status_fail_date"] = '0000-00-00 00:00:00';
++ if ((!isset($hosts[$host_id]["status_rec_date"])) || ($hosts[$host_id]["status_rec_date"] == ""))
++ $hosts[$host_id]["status_rec_date"] = '0000-00-00 00:00:00';
+
+ if ($status == HOST_DOWN) {
+ /* update total polls, failed polls and availability */