mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
feature: Add mysql failed query logging + fixed queries that break ONLY_FULL_GROUP_BY (#5327)
* feature: Add mysql failed query logging + fixed queries that break ONLY_FULL_GROUP_BY * fix all schema errors and update system
This commit is contained in:
committed by
Tony Murray
parent
8936d9503b
commit
da5783d917
@ -788,9 +788,9 @@ function getlocations()
|
||||
|
||||
// Fetch regular locations
|
||||
if ($_SESSION['userlevel'] >= '5') {
|
||||
$rows = dbFetchRows('SELECT D.device_id,location FROM devices AS D GROUP BY location ORDER BY location');
|
||||
$rows = dbFetchRows('SELECT location FROM devices AS D GROUP BY location ORDER BY location');
|
||||
} else {
|
||||
$rows = dbFetchRows('SELECT D.device_id,location FROM devices AS D, devices_perms AS P WHERE D.device_id = P.device_id AND P.user_id = ? GROUP BY location ORDER BY location', array($_SESSION['user_id']));
|
||||
$rows = dbFetchRows('SELECT location FROM devices AS D, devices_perms AS P WHERE D.device_id = P.device_id AND P.user_id = ? GROUP BY location ORDER BY location', array($_SESSION['user_id']));
|
||||
}
|
||||
|
||||
foreach ($rows as $row) {
|
||||
|
Reference in New Issue
Block a user