config cache issues
By default the configuration cached by the mod_perl2 instance. You can disable cache by setting cache/config=0. You should disable cache only if you have multiple calcms instances running on the same mod_perl2 server with different configuration. The Location of the configuration will be determined by config module now.
This commit is contained in:
@@ -6,7 +6,6 @@ no warnings 'redefine';
|
||||
|
||||
use Data::Dumper;
|
||||
|
||||
#use utf8;
|
||||
use DBI;
|
||||
use CGI qw(header param Vars);
|
||||
$CGI::POST_MAX = 1000;
|
||||
@@ -18,35 +17,32 @@ use log();
|
||||
use events();
|
||||
use time();
|
||||
|
||||
#binmode STDOUT, ":utf8";
|
||||
binmode STDOUT, ":encoding(UTF-8)";
|
||||
|
||||
my $r = shift;
|
||||
( my $cgi, my $params, my $error ) = params::get($r);
|
||||
if ( $0 =~ /events.*?\.cgi$/ ) {
|
||||
|
||||
#my $cgi=new CGI();
|
||||
#my %params=$cgi->Vars();
|
||||
our $config = config::get('config/config.cgi');
|
||||
my $config = config::getFromScriptLocation();
|
||||
|
||||
$params->{template} = '' unless defined $params->{template};
|
||||
$params->{recordings} = 1 if $params->{template} =~ /events_playout/;
|
||||
$params->{recordings} = 1 if $params->{template} =~ /events_playout/;
|
||||
|
||||
$params->{exclude_locations} = 1;
|
||||
$params->{exclude_projects} = 1;
|
||||
$params->{exclude_locations} = 1;
|
||||
$params->{exclude_projects} = 1;
|
||||
$params->{exclude_event_images} = 1;
|
||||
|
||||
my $request = {
|
||||
url => $ENV{QUERY_STRING},
|
||||
params => {
|
||||
original => $params,
|
||||
checked => events::check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
|
||||
my $output = '';
|
||||
events::get_cached_or_render( $output, $config, $request );
|
||||
print $output. "\n";
|
||||
my $request = {
|
||||
url => $ENV{QUERY_STRING},
|
||||
params => {
|
||||
original => $params,
|
||||
checked => events::check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
|
||||
my $output = '';
|
||||
events::get_cached_or_render( $output, $config, $request );
|
||||
print $output. "\n";
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user