Locations and tickets enforceClientAccess in POST fix a few missing client_id vars which were bale to be used for logging too

This commit is contained in:
johnnyq
2026-03-06 14:09:51 -05:00
parent 8fc3dfed1f
commit 71b19e125e
3 changed files with 212 additions and 12 deletions

View File

@@ -1277,7 +1277,7 @@ if (isset($_POST['export_contacts_csv'])) {
}
//Contacts
$sql = mysqli_query($mysqli,"SELECT * FROM contacts LEFT JOIN locations ON location_id = contact_location_id LEFT JOIN clients ON client_id = contact_client_id WHERE contact_archived_at IS NULL $client_query $access_permission_query ORDER BY contact_name ASC");
$sql = mysqli_query($mysqli,"SELECT * FROM contacts LEFT JOIN locations ON location_id = contact_location_id LEFT JOIN clients ON client_id = contact_client_id WHERE contact_archived_at IS NULL AND client_archived_at IS NULL $client_query $access_permission_query ORDER BY contact_name ASC");
$num_rows = mysqli_num_rows($sql);
if ($num_rows > 0) {