Refactor geolocation queries to use AND conditions for better accuracy. Update permission checks for equipment management to utilize unified 'equipment' scope. Enhance user role assignment logic to ensure correct username usage. Improve session error handling in login and index files for clearer user feedback.

This commit is contained in:
“VeLiTi”
2026-01-30 10:02:45 +01:00
parent b3327f21ed
commit 162933affa
10 changed files with 29 additions and 17 deletions

View File

@@ -179,9 +179,9 @@ switch ($action) {
case 'geolocation':
if ($whereclause == ''){
$whereclause = 'WHERE geolocation is not null OR geolocation != "["",""]"';
$whereclause = 'WHERE geolocation is not null AND geolocation != \'["",""]\'';
} else {
$whereclause .= ' AND geolocation is not null OR geolocation != "["",""]';
$whereclause .= ' AND geolocation is not null AND geolocation != \'["",""]\'';
}
$sql = 'SELECT distinct(geolocation) FROM equipment e '.$whereclause.'';