mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-11 18:37:28 -04:00
Add MID and EID substitutions
This commit is contained in:
@@ -700,6 +700,7 @@ sub substituteTags {
|
||||
|
||||
my $url = $Config{ZM_URL};
|
||||
$text =~ s/%ZP%/$url/g;
|
||||
$text =~ s/%MID%/$Monitor->{Id}/g if $Monitor;
|
||||
$text =~ s/%MN%/$Monitor->{Name}/g if $Monitor;
|
||||
if ($Summary) {
|
||||
$text =~ s/%MET%/$Summary->{TotalEvents}/g;
|
||||
@@ -718,6 +719,7 @@ sub substituteTags {
|
||||
$text =~ s/%EPI%/$url?view=event&mode=still&mid=$Event->{MonitorId}&eid=$Event->{Id}/g;
|
||||
$text =~ s/%EPATH%/$Event->Path()/g;
|
||||
$text =~ s/%EI%/$Event->{Id}/g;
|
||||
$text =~ s/%EID%/$Event->{Id}/g;
|
||||
$text =~ s/%EN%/$Event->{Name}/g;
|
||||
$text =~ s/%EC%/$Event->{Cause}/g;
|
||||
$text =~ s/%ED%/$Event->{Notes}/g;
|
||||
@@ -849,7 +851,7 @@ sub substituteTags {
|
||||
$text =~ s/%FP%/$url?view=filter&filter_name=$filter_name/g;
|
||||
|
||||
return $text;
|
||||
} # end subsitituteTags
|
||||
} # end substituteTags
|
||||
|
||||
sub sendSummaryEmail {
|
||||
my $filter = shift;
|
||||
@@ -1185,7 +1187,7 @@ sub executeCommand {
|
||||
my $Event = shift;
|
||||
|
||||
my $command = $filter->{AutoExecuteCmd};
|
||||
if ($command =~ /%\w+.%/) {
|
||||
if ($command =~ /%\w+%/) {
|
||||
$command = substituteTags($command, $filter, $Event);
|
||||
} else {
|
||||
$command .= ' '.$Event->Path();
|
||||
|
||||
Reference in New Issue
Block a user