diff --git a/includes/functions.php b/includes/functions.php index 0e1e0e94e7..f97dd4177a 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -235,6 +235,7 @@ function delete_device($id) { } $ret .= "Removed device $host\n"; + log_event("Device $host has been removed", 0, 'system'); return $ret; } @@ -690,7 +691,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()"),