Skip to content

Commit

Permalink
Fix auth issue, parentheses in the wrong location
Browse files Browse the repository at this point in the history
Was causing too many arguments to be sent to cacti_sizeof which only take 1, instead of get_allowed_devices.
  • Loading branch information
cigamit authored Feb 22, 2025
1 parent f80747e commit da2d844
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ function is_tree_branch_empty($tree_id, $parent = 0) {
);

if (!cacti_sizeof($sites)) {
if (cacti_sizeof($hosts) && cacti_sizeof(get_allowed_devices('h.id IN(' . implode(',', $hosts) . ')'), 'description', '', -1) > 0) {
if (cacti_sizeof($hosts) && cacti_sizeof(get_allowed_devices('h.id IN(' . implode(',', $hosts) . ')', 'description', '', -1)) > 0) {
return false;
}
} else {
Expand All @@ -945,7 +945,7 @@ function is_tree_branch_empty($tree_id, $parent = 0) {
);
}

if (cacti_sizeof($site_hosts) && cacti_sizeof(get_allowed_devices('h.id IN(' . implode(',', $site_hosts) . ')'), 'description', '', -1) > 0) {
if (cacti_sizeof($site_hosts) && cacti_sizeof(get_allowed_devices('h.id IN(' . implode(',', $site_hosts) . ')', 'description', '', -1)) > 0) {
return false;
}
}
Expand Down

0 comments on commit da2d844

Please sign in to comment.