From e03031e793608beacfcfcb3db72f3f29c0bdf075 Mon Sep 17 00:00:00 2001 From: laf Date: Thu, 21 Jan 2016 23:12:18 +0000 Subject: [PATCH] Added eventlog to show when device has been removed --- includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index ebd7008b32..1ab747433b 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -236,6 +236,7 @@ function delete_device($id) { } $ret .= "Removed device $host\n"; + log_event("Device $host has been removed", 0, 'system'); return $ret; } @@ -691,7 +692,7 @@ function log_event($text, $device = NULL, $type = NULL, $reference = NULL) { $device = device_by_id_cache($device); } - $insert = array('host' => ($device['device_id'] ? $device['device_id'] : "NULL"), + $insert = array('host' => ($device['device_id'] ? $device['device_id'] : 0), 'reference' => ($reference ? $reference : "NULL"), 'type' => ($type ? $type : "NULL"), 'datetime' => array("NOW()"),