lib: replace shift my @_ (pt2)
This commit is contained in:
@@ -25,8 +25,7 @@ sub get_columns ($){
|
||||
# get all studio_timeslot_dates for studio_id within given time range
|
||||
# calculate start_date, end_date, weeday, day from start and end(datetime)
|
||||
sub get ($$){
|
||||
my $config = shift;
|
||||
my $condition = shift;
|
||||
my ($config, $condition) = @_;
|
||||
|
||||
my $date_range_include = 0;
|
||||
$date_range_include = 1 if ( defined $condition->{date_range_include} ) && ( $condition->{date_range_include} == 1 );
|
||||
@@ -171,10 +170,8 @@ sub update {
|
||||
# calculate all start/end datetimes between start_date and stop_date with a frequency(days)
|
||||
# returns list of hashs with start and end
|
||||
sub get_dates {
|
||||
my $start_datetime = shift; # start
|
||||
my $end_datetime = shift; # start
|
||||
my $stop_date = shift; # limit recurring events
|
||||
my $frequency = shift; # in days
|
||||
my ($start_datetime, $end_datetime, $stop_date, $frequency) = @_;
|
||||
#days
|
||||
|
||||
my @start = @{ time::datetime_to_array($start_datetime) };
|
||||
return unless @start >= 6;
|
||||
@@ -284,8 +281,7 @@ sub delete {
|
||||
# time based filter to check if studio is assigned to an studio at a given time range
|
||||
# return 1 if there is a schedule date starting before start and ending after end
|
||||
sub can_studio_edit_events {
|
||||
my $config = shift;
|
||||
my $condition = shift;
|
||||
my ($config, $condition) = @_;
|
||||
|
||||
my @conditions = ();
|
||||
my @bind_values = ();
|
||||
@@ -348,8 +344,7 @@ sub can_studio_edit_events {
|
||||
# returns hashref with start and end of merged slot
|
||||
# returns undef if not slot could be found
|
||||
sub getMergedDays {
|
||||
my $config = shift;
|
||||
my $condition = shift;
|
||||
my ($config, $condition) = @_;
|
||||
|
||||
my @conditions = ();
|
||||
my @bind_values = ();
|
||||
|
||||
Reference in New Issue
Block a user