New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
latitude and longitude on devices/device fetch #8504
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this, if you can update the html/includes/api_functions.inc.php
with the patch I've provided then we can merge this in.
html/includes/api_functions.inc.php
Outdated
@@ -347,7 +347,7 @@ function list_devices() | |||
$param[] = $_SESSION['user_id']; | |||
} | |||
$devices = array(); | |||
$dev_query = "SELECT $select FROM `devices` AS d $join WHERE $sql GROUP BY d.`hostname` ORDER BY $order"; | |||
$dev_query = "SELECT dev.*, lat, lng FROM (SELECT $select FROM `devices` AS d $join WHERE $sql GROUP BY d.`hostname` ORDER BY $order) dev LEFT JOIN locations ON locations.location=dev.location"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this line back to how it was and use this patch instead:
A lot of thanks for your help @laf. Is merging blocked until I sign as "axsor"? Because I will need to change github username now. If is necessary I will do it temporary. |
Yes it is but if you squash your commit to use the first name then it will be fine. |
I close and reopen de pull request because I can't resolve it... |
The inspection completed: No new issues |
Really... |
DO NOT DELETE THIS TEXT
Please note
Testers
If you would like to test this pull request then please run:
./scripts/github-apply <pr_id>
, i.e./scripts/github-apply 5926