From cc83582a90b4c7fbf94bb6fad2d5d39ed8bb2d2b Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 26 May 2017 13:04:08 -0400 Subject: [PATCH] put back AutoMessage and AutoVideo logic --- scripts/ZoneMinder/lib/ZoneMinder/Filter.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Filter.pm b/scripts/ZoneMinder/lib/ZoneMinder/Filter.pm index 636e505aa..ecf65dd25 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Filter.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Filter.pm @@ -250,14 +250,14 @@ sub Sql { } # end if terms if ( $self->{Sql} ) { - #if ( $self->{AutoMessage} ) { + if ( $self->{AutoMessage} ) { # Include all events, including events that are still ongoing # and have no EndTime yet $sql .= " and ( ".$self->{Sql}." )"; - #} else { + } else { # Only include closed events (events with valid EndTime) - #$sql .= " where not isnull(E.EndTime) and ( ".$self->{Sql}." )"; - #} + $sql .= " where not isnull(E.EndTime) and ( ".$self->{Sql}." )"; + } } my @auto_terms; if ( $self->{AutoArchive} ) { @@ -265,9 +265,9 @@ sub Sql { } # Don't do this, it prevents re-generation and concatenation. # If the file already exists, then the video won't be re-recreated - #if ( $self->{AutoVideo} ) { - #push @auto_terms, "E.Videoed = 0"; - #} + if ( $self->{AutoVideo} ) { + push @auto_terms, "E.Videoed = 0"; + } if ( $self->{AutoUpload} ) { push @auto_terms, "E.Uploaded = 0"; }