show only published events at calendar view
This commit is contained in:
@@ -8,6 +8,7 @@ use Date::Calc();
|
||||
|
||||
use template();
|
||||
use cache();
|
||||
use events();
|
||||
|
||||
use base 'Exporter';
|
||||
our @EXPORT_OK = qw(init get_cached_or_render get render get_calendar_weeks configure_cache);
|
||||
@@ -203,7 +204,7 @@ sub get {
|
||||
my $woy_year = undef;
|
||||
|
||||
for my $date (@$week) {
|
||||
my ( $year, $month, $day ) = split( /\-/, $date );
|
||||
my ( $year, $month, $day ) = split( /\-/, $date, 3 );
|
||||
my $weekday = 0;
|
||||
my $day_result = undef;
|
||||
|
||||
|
||||
@@ -1414,6 +1414,7 @@ sub get_by_date_range {
|
||||
$end = time::add_hours_to_datetime( $end, $day_starting_hour );
|
||||
|
||||
my $conditions = [];
|
||||
push @$conditions, 'published = 1';
|
||||
push @$conditions, 'start between ? and ?';
|
||||
my $bind_values = [ $start, $end ];
|
||||
|
||||
@@ -1430,7 +1431,7 @@ sub get_by_date_range {
|
||||
where $conditions
|
||||
};
|
||||
|
||||
#print STDERR Dumper($query);
|
||||
#print STDERR Dumper($query) . Dumper($bind_values);
|
||||
|
||||
my $events = db::get( $dbh, $query, $bind_values );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user