diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index 1b4db40c59..d37c59fb6e 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -85,7 +85,7 @@ function discover_device($device, $options = NULL) } echo("\n"); - + // If we've specified a module, use that, else walk the modules array if ($options['m']) { @@ -118,8 +118,8 @@ function discover_device($device, $options = NULL) } $device_end = utime(); $device_run = $device_end - $device_start; $device_time = substr($device_run, 0, 5); - - dbUpdate(array('last_discovered' => 'NOW()', 'type' => $device['type'], 'last_discovered_timetaken' => $device_time), 'devices', '`device_id` = ?', array($device['device_id'])); + + dbUpdate(array('last_discovered' => array('NOW()'), 'type' => $device['type'], 'last_discovered_timetaken' => $device_time), 'devices', '`device_id` = ?', array($device['device_id'])); echo("Discovered in $device_time seconds\n"); diff --git a/includes/polling/functions.inc.php b/includes/polling/functions.inc.php index b40a5f18a9..4582426c43 100644 --- a/includes/polling/functions.inc.php +++ b/includes/polling/functions.inc.php @@ -223,9 +223,9 @@ function poll_device($device, $options) rrdtool_update($ping_rrd, "N:$ping_time"); } - $update_array['last_polled'] = 'NOW()'; + $update_array['last_polled'] = array('NOW()'); $update_array['last_polled_timetaken'] = $device_time; - $update_array['last_ping'] = 'NOW()'; + $update_array['last_ping'] = array('NOW()'); $update_array['last_ping_timetaken'] = $ping_time; #echo("$device_end - $device_start; $device_time $device_run");