@@ 268-271 (lines=4) @@ | ||
265 | ); |
|
266 | ||
267 | // Prevent form submit when no user groups are available or selected |
|
268 | if (!$data['autogroups_group_id']) |
|
269 | { |
|
270 | trigger_error($this->language->lang('ACP_AUTOGROUPS_INVALID_GROUPS') . adm_back_link($this->u_action), E_USER_WARNING); |
|
271 | } |
|
272 | ||
273 | // Prevent form submit when min and max values are identical |
|
274 | if ($data['autogroups_min_value'] == $data['autogroups_max_value']) |
|
@@ 274-277 (lines=4) @@ | ||
271 | } |
|
272 | ||
273 | // Prevent form submit when min and max values are identical |
|
274 | if ($data['autogroups_min_value'] == $data['autogroups_max_value']) |
|
275 | { |
|
276 | trigger_error($this->language->lang('ACP_AUTOGROUPS_INVALID_RANGE') . adm_back_link($this->u_action), E_USER_WARNING); |
|
277 | } |
|
278 | ||
279 | // Prevent form submit when the target group is also in the excluded groups array |
|
280 | if (in_array($data['autogroups_group_id'], $data['autogroups_excluded_groups'])) |
|
@@ 280-283 (lines=4) @@ | ||
277 | } |
|
278 | ||
279 | // Prevent form submit when the target group is also in the excluded groups array |
|
280 | if (in_array($data['autogroups_group_id'], $data['autogroups_excluded_groups'])) |
|
281 | { |
|
282 | trigger_error($this->language->lang('ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS') . adm_back_link($this->u_action), E_USER_WARNING); |
|
283 | } |
|
284 | ||
285 | // Format autogroups_excluded_groups for storage in the db |
|
286 | $data['autogroups_excluded_groups'] = !empty($data['autogroups_excluded_groups']) ? json_encode($data['autogroups_excluded_groups']) : ''; |