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