From 9fec11c4a99dc6bc9e2109d41ea4dbd35adb5f09 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 14 Dec 2020 14:41:34 -0500 Subject: [PATCH] Add missing Monitor() function. --- scripts/ZoneMinder/lib/ZoneMinder/Event.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Event.pm b/scripts/ZoneMinder/lib/ZoneMinder/Event.pm index 49c2e47f3..40b51a5fd 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Event.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Event.pm @@ -915,6 +915,15 @@ sub canEdit { return 0; } # end sub canEdit +sub Monitor { + my $self = shift; + $$self{Monitor} = shift if @_; + if ( !$$self{Monitor} ) { + $$self{Monitor} = new ZoneMinder::Monitor($$self{MonitorId}); + } + return $$self{Monitor}; +} + 1; __END__