From: Michael J. Rubinsky Date: Thu, 7 Oct 2010 14:19:34 +0000 (-0400) Subject: fix reading/saving flags when editing/creating a new rule X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f02bcd8fa9556680392198e15a03a58cf588eb19;p=horde.git fix reading/saving flags when editing/creating a new rule --- diff --git a/ingo/rule.php b/ingo/rule.php index 5d7f95f15..5c3d34b28 100644 --- a/ingo/rule.php +++ b/ingo/rule.php @@ -113,11 +113,9 @@ case 'rule_delete': $rule['stop'] = $vars->stop; $rule['flags'] = 0; - $flags = $vars->flags || array(); - if (!empty($flags)) { - foreach ($flags as $val) { - $rule['flags'] |= $val; - } + $flags = empty($vars->flags) ? array() : $vars->flags; + foreach ($flags as $val) { + $rule['flags'] |= $val; } /* Update the timestamp for the rules. */