Skip to content
Snippets Groups Projects
Commit 11c4a20d authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

pridana podminka aby se nestahovali testovaci udalosti

parent 6c7b2f54
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ use Data::Dumper; ...@@ -48,7 +48,7 @@ use Data::Dumper;
use Net::CIDR::Lite; use Net::CIDR::Lite;
use DateTime; use DateTime;
our $VERSION = "1.0.0"; our $VERSION = "1.0";
################################################################################ ################################################################################
# CONFIG FILE VARIABLES # CONFIG FILE VARIABLES
...@@ -314,11 +314,11 @@ sub getNewEvents ...@@ -314,11 +314,11 @@ sub getNewEvents
# check if client want your own events or not # check if client want your own events or not
if ($receive_own_events eq 't') { if ($receive_own_events eq 't') {
$sth = $DBH->prepare("SELECT * FROM events WHERE id > $last_id_db AND type = $requested_type_db AND valid = 't' ORDER BY id ASC;"); $sth = $DBH->prepare("SELECT * FROM events WHERE type != 'test' AND id > $last_id_db AND type = $requested_type_db AND valid = 't' ORDER BY id ASC;");
} else { } else {
my ($domain) = $CN =~ /([^\.]+\.[^\.]+)$/; my ($domain) = $CN =~ /([^\.]+\.[^\.]+)$/;
my $domain_db = $DBH->quote("%$domain"); my $domain_db = $DBH->quote("%$domain");
$sth = $DBH->prepare("SELECT * FROM events WHERE id > $last_id_db AND type = $requested_type_db AND valid = 't' AND hostname NOT LIKE $domain_db ORDER BY id ASC;"); $sth = $DBH->prepare("SELECT * FROM events WHERE type != 'test' AND id > $last_id_db AND type = $requested_type_db AND valid = 't' AND hostname NOT LIKE $domain_db ORDER BY id ASC;");
} }
if ( !defined $sth ) { die("Cannot prepare statement in getNewEvents: $DBI::errstr\n") } if ( !defined $sth ) { die("Cannot prepare statement in getNewEvents: $DBI::errstr\n") }
$sth->execute; $sth->execute;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment