set numbered parameters using entry::set_numbers

This commit is contained in:
Milan
2020-03-08 14:04:35 +01:00
parent b2dc101354
commit 94d4ca59d8
27 changed files with 136 additions and 207 deletions

View File

@@ -280,15 +280,11 @@ sub check_params {
#numeric values
$checked->{exclude} = 0;
for my $param (
entry::set_numbers( $checked, $params, [
'project_id', 'studio_id', 'default_studio_id', 'schedule_id',
'exclude', 'show_hint_to_add_schedule', 'weekday week_of_month', 'month'
)
{
if ( ( defined $params->{$param} ) && ( $params->{$param} =~ /^\d+$/ ) ) {
$checked->{$param} = $params->{$param};
}
}
]);
if ( defined $checked->{studio_id} ) {
$checked->{default_studio_id} = $checked->{studio_id};
} else {