remove time_of_day

This commit is contained in:
Milan
2023-02-23 21:05:18 +01:00
parent 1d4f5051df
commit f626c510ad
2 changed files with 3 additions and 28 deletions

View File

@@ -785,14 +785,6 @@ sub get_query {
}
if ( ( defined $params->{time_of_day} )
&& ( $params->{time_of_day} ne '' ) )
{
push @date_conds, ' ( time_of_day = ? ) ';
push @$bind_values, $params->{time_of_day};
}
my $date_cond = join " and ", @date_conds;
push @$where_cond, $date_cond if ( $date_cond ne '' );
}
@@ -1010,7 +1002,6 @@ sub get_query {
,e.id event_id
,e.start
,e.end
,e.time_of_day
,e.program
,e.series_name
,e.title
@@ -1551,16 +1542,6 @@ sub check_params {
}
}
my $time_of_day = $params->{time_of_day} || '';
my $found = 0;
if ( defined $time_of_day ) {
for my $key ( 'night', 'morning', 'noon', 'afternoon', 'evening' ) {
$found = 1 if ( $key eq $time_of_day );
}
log::error( $config, 'invalid time_of_day' )
if ( ( $time_of_day ne '' ) && ( $found == 0 ) );
}
my $tag = $params->{tag} || '';
if ( ( defined $tag ) && ( $tag ne '' ) ) {
log::error( $config, "invalid tag" ) if ( $tag =~ /\s/ );
@@ -1729,7 +1710,6 @@ sub check_params {
my $checked = {
date => $date,
time => $time,
time_of_day => $time_of_day,
from_date => $from_date,
till_date => $till_date,
date_range_include => $date_range_include,

View File

@@ -164,7 +164,6 @@ var calcms = (function($) {
var date = my.get('date');
var month = my.get('month');
var weekday = my.get('weekday');
var time_of_day = '';
var time = '';
var program = my.get('program');
var series_name = my.get('series_name');
@@ -267,12 +266,10 @@ var calcms = (function($) {
} else {
weekday = '';
time_of_day = '';
}
}
if (field == 'month' || field == 'week' || field == 'weekday'
|| field == 'time_of_day') {
if (field == 'month' || field == 'week' || field == 'weekday'){
time = '';
}
@@ -312,10 +309,6 @@ var calcms = (function($) {
if (url.substr(url.length - 1, url.length) != '/') {
url += '/';
}
if (time_of_day != '') {
url += "&time_of_day=" + time_of_day;
} else if (time != '' && time != 'null') {
url += "&" + time;
}
@@ -610,6 +603,8 @@ var calcms = (function($) {
var url = calendar_url;
console.log(calendar_url);
if (field == 'month') {
url += '/' + date + '/';
}