mirror of
https://github.com/itflow-org/itflow
synced 2026-08-10 09:37:15 +00:00
clientScopeSql sweep whicn now removed the extra unessesary client joins
This commit is contained in:
@@ -84,8 +84,11 @@ function clientScopeSql($column) {
|
||||
|
||||
$sql = '';
|
||||
|
||||
// 0 is included deliberately: a record with no client isn't any client's data, so a
|
||||
// restricted user keeps seeing it. This also matches the deny branch below, where 0
|
||||
// already passes NOT IN, and the old hand-rolled ticket override that did IN (0,...).
|
||||
if (!empty($client_access_array)) {
|
||||
$sql .= " AND $column IN (" . implode(',', array_map('intval', $client_access_array)) . ")";
|
||||
$sql .= " AND $column IN (0," . implode(',', array_map('intval', $client_access_array)) . ")";
|
||||
}
|
||||
|
||||
if (!empty($client_deny_array)) {
|
||||
|
||||
Reference in New Issue
Block a user