website/agenda/all-events.cgi: query events of all projects and studios
events sets a filter to included/excluded projects, studios and locations. all-events.cgi does not set this filter and can be used to query events from any project.
This commit is contained in:
34
website/agenda/all-events.cgi
Normal file
34
website/agenda/all-events.cgi
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
no warnings 'redefine';
|
||||
|
||||
use params();
|
||||
use config();
|
||||
use events();
|
||||
|
||||
binmode STDOUT, ":encoding(UTF-8)";
|
||||
|
||||
my $r = shift;
|
||||
( my $cgi, my $params, my $error ) = params::get($r);
|
||||
if ( $0 =~ /all-events.*?\.cgi$/ ) {
|
||||
|
||||
my $config = config::getFromScriptLocation();
|
||||
|
||||
$params->{template} = '' unless defined $params->{template};
|
||||
$params->{recordings} = 1 if $params->{template} =~ /events_playout/;
|
||||
$params->{exclude_event_images} = 1;
|
||||
|
||||
my $request = {
|
||||
url => $ENV{QUERY_STRING},
|
||||
params => {
|
||||
original => $params,
|
||||
checked => events::check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
|
||||
events::get_cached_or_render( 'print', $config, $request );
|
||||
}
|
||||
|
||||
1;
|
||||
Reference in New Issue
Block a user