It seems that the error is related to a missing WHERE clause. Instead of
Code: Select all
select * from Monitors AND Id IN (6,3,5,4,8,16,14) order by Sequence asc
it probably should have been
Code: Select all
select * from Monitors WHERE Id IN (6,3,5,4,8,16,14) order by Sequence asc
in montagereview.php.
I added a small patch around line 150 in montagereview.php
Code: Select all
if ( !empty($user['MonitorIds']) )
{
# Patch jogo: 2017-08-13
$monitorsSql .= ' WHERE 1=1 ';
# End of patch
$eventsSql .= ' AND M.Id IN ('.$user['MonitorIds'].')';
$monitorsSql .= ' AND Id IN ('.$user['MonitorIds'].')';
$frameSql .= ' AND E.MonitorId IN ('.$user['MonitorIds'].')';
}
I could have replaced the AND by WHERE, but I wanted an extra line. Initially the view hang, but after a restart of zoneminder and apache, it worked as expected. I think restarting apache would have sufficed.
Let's see, where the next bug shows up, where the db server complains about too many where clauses,
...