diff options
author | Simon Rettberg | 2023-11-02 19:08:58 +0100 |
---|---|---|
committer | Simon Rettberg | 2023-11-02 19:08:58 +0100 |
commit | c2d95ffaeaa289752b4c7b6664b6ca112a02e350 (patch) | |
tree | 2c29b0157d14198aadbdbc9f8c18ded0bd4dadcd /modules-available/permissionmanager/inc/permissionutil.inc.php | |
parent | [rebootcontrol] Remove API prototype (diff) | |
download | slx-admin-c2d95ffaeaa289752b4c7b6664b6ca112a02e350.tar.gz slx-admin-c2d95ffaeaa289752b4c7b6664b6ca112a02e350.tar.xz slx-admin-c2d95ffaeaa289752b4c7b6664b6ca112a02e350.zip |
Roundup of issues reported by PHPStorm
Mostly redundant checks, logic errors, dead code, etc.
Diffstat (limited to 'modules-available/permissionmanager/inc/permissionutil.inc.php')
-rw-r--r-- | modules-available/permissionmanager/inc/permissionutil.inc.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/modules-available/permissionmanager/inc/permissionutil.inc.php b/modules-available/permissionmanager/inc/permissionutil.inc.php index 20023281..d3f20b4f 100644 --- a/modules-available/permissionmanager/inc/permissionutil.inc.php +++ b/modules-available/permissionmanager/inc/permissionutil.inc.php @@ -132,15 +132,13 @@ class PermissionUtil if (!$cacheAll) break; } - if ($cacheAll) { - $cache[$key][(int)$row['locationid']] = true; - $list = ($row['locationid'] === null) ? array_keys($allLocs) : $allLocs[(int)$row['locationid']]['children']; - foreach ($list as $lid) { - $cache[$key][$lid] = true; - } - if ($row['locationid'] === null) - break; + $cache[$key][(int)$row['locationid']] = true; + $list = ($row['locationid'] === null) ? array_keys($allLocs) : $allLocs[(int)$row['locationid']]['children']; + foreach ($list as $lid) { + $cache[$key][$lid] = true; } + if ($row['locationid'] === null) + break; } } if ($locationid === null) { |