@@ -117,7 +117,7 @@ |
||
117 | 117 | * Notification handler to call notification enable/disable/purge steps |
118 | 118 | * |
119 | 119 | * @param string $step The step (enable, disable, purge) |
120 | - * @param array $notification_types The notification type names |
|
120 | + * @param string[] $notification_types The notification type names |
|
121 | 121 | * @return string Return notifications as temporary state |
122 | 122 | * @access protected |
123 | 123 | */ |
@@ -258,8 +258,7 @@ |
||
258 | 258 | if ($group_rule['autogroups_group_id'] == $current_rule['autogroups_group_id'] && |
259 | 259 | $group_rule['autogroups_type_id'] != $current_rule['autogroups_type_id'] && |
260 | 260 | count($user_id_ary) |
261 | - ) |
|
262 | - { |
|
261 | + ) { |
|
263 | 262 | // Load other auto group rule's condition type and get new data for our user(s) |
264 | 263 | $condition = $this->container->get($group_rule['autogroups_type_name']); |
265 | 264 | $condition_user_data = $condition->get_users_for_condition(array( |
@@ -294,11 +294,14 @@ |
||
294 | 294 | // Format data |
295 | 295 | $data['autogroups_excluded_groups'] = !empty($data['autogroups_excluded_groups']) ? json_encode($data['autogroups_excluded_groups']) : ''; |
296 | 296 | |
297 | - if ($autogroups_id != 0) // Update existing auto group data |
|
297 | + if ($autogroups_id != 0) |
|
298 | + { |
|
299 | + // Update existing auto group data |
|
298 | 300 | { |
299 | 301 | $sql = 'UPDATE ' . $this->autogroups_rules_table . ' |
300 | 302 | SET ' . $this->db->sql_build_array('UPDATE', $data) . ' |
301 | 303 | WHERE autogroups_id = ' . (int) $autogroups_id; |
304 | + } |
|
302 | 305 | $this->db->sql_query($sql); |
303 | 306 | } |
304 | 307 | else // Insert new auto group data |