@@ 279-282 (lines=4) @@ | ||
276 | ); |
|
277 | ||
278 | // Prevent form submit when no user groups are available or selected |
|
279 | if (!$data['autogroups_group_id']) |
|
280 | { |
|
281 | trigger_error($this->language->lang('ACP_AUTOGROUPS_INVALID_GROUPS') . adm_back_link($this->u_action), E_USER_WARNING); |
|
282 | } |
|
283 | ||
284 | // Prevent form submit when min and max values are identical |
|
285 | if ($data['autogroups_min_value'] == $data['autogroups_max_value']) |
|
@@ 285-288 (lines=4) @@ | ||
282 | } |
|
283 | ||
284 | // Prevent form submit when min and max values are identical |
|
285 | if ($data['autogroups_min_value'] == $data['autogroups_max_value']) |
|
286 | { |
|
287 | trigger_error($this->language->lang('ACP_AUTOGROUPS_INVALID_RANGE') . adm_back_link($this->u_action), E_USER_WARNING); |
|
288 | } |
|
289 | ||
290 | // Prevent form submit when the target group is also in the excluded groups array |
|
291 | if (in_array($data['autogroups_group_id'], $data['autogroups_excluded_groups'])) |
|
@@ 291-294 (lines=4) @@ | ||
288 | } |
|
289 | ||
290 | // Prevent form submit when the target group is also in the excluded groups array |
|
291 | if (in_array($data['autogroups_group_id'], $data['autogroups_excluded_groups'])) |
|
292 | { |
|
293 | trigger_error($this->language->lang('ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS') . adm_back_link($this->u_action), E_USER_WARNING); |
|
294 | } |
|
295 | ||
296 | // Format autogroups_excluded_groups for storage in the db |
|
297 | $data['autogroups_excluded_groups'] = !empty($data['autogroups_excluded_groups']) ? json_encode($data['autogroups_excluded_groups']) : ''; |