add event creation batch, lib changes for past changes

This commit is contained in:
Milan
2018-03-17 13:38:36 +01:00
parent aadf3fd06e
commit 077d9c5a53
15 changed files with 885 additions and 114 deletions

View File

@@ -112,18 +112,18 @@ sub get_query{
my @conditions=();
my $bind_values=[];
#exclude comments from config filter/exclude_locations
#exclude comments from config filter/locations_to_exclude
if (
(defined $config->{filter})
&& (defined $config->{filter}->{exclude_locations})
&& (defined $config->{filter}->{locations_to_exclude})
){
my @exclude_locations=split(/[,\s]+/,$config->{filter}->{exclude_locations});
my $exclude_locations=join(', ',map {'?'} @exclude_locations);
my @locations_to_exclude=split(/[,\s]+/,$config->{filter}->{locations_to_exclude});
my $locations_to_exclude=join(', ',map {'?'} @locations_to_exclude);
$from.=',calcms_events e';
push @conditions,'e.id=c.event_id';
push @conditions,'e.location not in ('.$exclude_locations.')';
for my $location (@exclude_locations){
push @conditions,'e.location not in ('.$locations_to_exclude.')';
for my $location (@locations_to_exclude){
push @$bind_values, $location;
}
}