|
timcraig
Joined: Mon Dec 10, 2007 6:53 pm Posts: 194 Location: San Jose, CA
|
 A small zmfilter.pl fix
I'm running a Zoneminder 2.22.3 installation and I was having problems running background filters.
If I had a filter with "Name" set with operator "matches", the filter would not work when running in the background. The zmfilter.log file would list an error like:
12/09/07 21:09:02.642208 zmfilter[4676].ERR [Can't execute filter 'select E.Id,E.MonitorId,M.Name as MonitorName,M.DefaultRate,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,unix_timestamp(E.StartTime) as Time,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived,E.Videoed,E.Uploaded,E.Emailed,E.Messaged,E.Executed from Events as E inner join Monitors as M on M.Id = E.MonitorId where not isnull(E.EndTime) and ( E.Archived = 0 and E.Name regexp Event- and E.StartTime <2007>"Does Not Match" case.
On line 378:
$filter_sql .= " not regexp $value";
needs to be changed to
$filter_sql .= " not regexp '$value'";
With those changes, my filters began to work after restarting ZM.
|
|
zoneminder
Site Admin
Joined: Wed Jul 09, 2003 3:07 pm Posts: 5221 Location: Bristol, UK
|
Thanks for this. Sorry, I forgot to comment at the time when you posted.
_________________ Phil
|
|
timcraig
Joined: Mon Dec 10, 2007 6:53 pm Posts: 194 Location: San Jose, CA
|
No problem. Thank you for making zoneminder. I really love the software.
Another part in the code to fix is on line 374
$filter_sql .= " regexp $value";
needs to be changed to
$filter_sql .= " regexp '$value'";
|