From 44cf2fc9642e47ac821aea6ce1e35588ca147d4f Mon Sep 17 00:00:00 2001 From: stan Date: Thu, 16 Oct 2003 09:01:56 +0000 Subject: [PATCH] Fixed Triggers initialisation problem. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@655 e3e1d417-86f3-4887-817a-d78f3d33393f --- web/zm_actions.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/zm_actions.php b/web/zm_actions.php index 33f682e7a..498f1f52d 100644 --- a/web/zm_actions.php +++ b/web/zm_actions.php @@ -231,7 +231,14 @@ if ( $action ) if ( $new_section_length != $monitor['SectionLength'] ) $changes[] = "SectionLength = '$new_section_length'"; if ( $new_frame_skip != $monitor['FrameSkip'] ) $changes[] = "FrameSkip = '$new_frame_skip'"; if ( $new_runmode != $monitor['RunMode'] ) $changes[] = "RunMode = '$new_runmode'"; - if ( join(',',$new_triggers) != $monitor['Triggers'] ) $changes[] = "Triggers = '".join(',',$new_triggers)."'"; + if ( $new_triggers ) + { + if ( join(',',$new_triggers) != $monitor['Triggers'] ) $changes[] = "Triggers = '".join(',',$new_triggers)."'"; + } + elseif ( $monitor['Triggers'] ) + { + $changes[] = "Triggers = ''"; + } if ( $new_type != $monitor['Type'] ) $changes[] = "Type = '$new_type'"; break; }