Skip to content

Commit

Permalink
Revert "Simplify."
Browse files Browse the repository at this point in the history
This reverts commit 680e772.
  • Loading branch information
mrubinsk committed Jun 27, 2015
1 parent ce9b0cd commit 818d9d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/Perms/lib/Horde/Perms/Permission.php
Expand Up @@ -181,13 +181,13 @@ public function updatePermissions($perms)

if ($type == 'matrix') {
foreach ($perm_types as $val => $label) {
if (strlen($name_values[$val])) {
if ($name_values[$val] === '0' || !empty($name_values[$val])) {
$this->setPerm($permId, $val, false);
} else {
$this->unsetPerm($permId, $val, false);
}
}
} elseif (strlen($name_values)) {
} elseif ($name_values === '0' || !empty($name_values)) {
$this->setPerm($permId, $name_values, false);
} else {
$this->unsetPerm($permId, null, false);
Expand Down

0 comments on commit 818d9d5

Please sign in to comment.