From eb7835c8b3a59bbff280e45e0bfb3352a96a71b1 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Sun, 21 Feb 2010 14:57:36 +0000 Subject: [PATCH] hm, fix to last commit, debug output would never fire git-svn-id: http://www.observium.org/svn/observer/trunk@921 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 8e68eb2e64..833e832681 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -817,7 +817,10 @@ function eventlog($eventtext,$device_id = "", $interface_id = "") mysql_query($event_query); } -function log_event($text, $device = NULL, $type = NULL, $reference = NULL) { +function log_event($text, $device = NULL, $type = NULL, $reference = NULL) +{ + global $debug; + $event_query = "INSERT INTO eventlog (host, reference, type, datetime, message) VALUES (" . ($device['device_id'] ? $device['device_id'] : "NULL"); $event_query .= ", " . ($reference ? $reference : "NULL") . ", " . ($type ? $type : "NULL") . ", NOW(), '" . mres($text) . "')"; if ($debug) { echo($event_query . "\n"); }