add single quotes in eventlog statement

git-svn-id: http://www.observium.org/svn/observer/trunk@923 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-02-21 15:18:13 +00:00
parent c32f652bd4
commit 8ac21dc054
+1 -1
View File
@@ -822,7 +822,7 @@ 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) . "')";
$event_query .= ", '" . ($reference ? $reference : "NULL") . "', '" . ($type ? $type : "NULL") . "', NOW(), '" . mres($text) . "')";
if ($debug) { echo($event_query . "\n"); }
mysql_query($event_query);
}