mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 00:24:21 +02:00
Updated to use new table name
This commit is contained in:
@@ -429,7 +429,7 @@ function location_to_latlng($device) {
|
||||
if (!empty($device_location)) {
|
||||
$new_device_location = preg_replace("/ /","+",$device_location);
|
||||
// We have a location string for the device.
|
||||
$loc = dbFetchRow("SELECT `lat`,`lng` FROM `coordinates` WHERE `location`=? LIMIT 1", array($device_location));
|
||||
$loc = dbFetchRow("SELECT `lat`,`lng` FROM `location` WHERE `location`=? LIMIT 1", array($device_location));
|
||||
if (is_array($loc) === false) {
|
||||
// Grab data from which ever Geocode service we use.
|
||||
switch ($config['geoloc']['engine']) {
|
||||
@@ -460,7 +460,7 @@ function location_to_latlng($device) {
|
||||
else {
|
||||
$loc['timestamp'] = array('NOW()');
|
||||
$loc['location'] = $device_location;
|
||||
if (dbInsert($loc, 'coordinates')) {
|
||||
if (dbInsert($loc, 'locations')) {
|
||||
d_echo("Device lat/lng created\n");
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user