Merge branch 'master' of github.com:ZoneMinder/zoneminder
This commit is contained in:
commit
b26ce4378d
|
@ -255,7 +255,7 @@ void zmDbQueue::process() {
|
||||||
Logger *log = Logger::fetch();
|
Logger *log = Logger::fetch();
|
||||||
Logger::Level db_level = log->databaseLevel();
|
Logger::Level db_level = log->databaseLevel();
|
||||||
log->databaseLevel(Logger::NOLOG);
|
log->databaseLevel(Logger::NOLOG);
|
||||||
Warning("db queue size has grown larger than 10 entries");
|
Warning("db queue size has grown larger %zu than 10 entries", mQueue.size());
|
||||||
log->databaseLevel(db_level);
|
log->databaseLevel(db_level);
|
||||||
}
|
}
|
||||||
std::string sql = mQueue.front();
|
std::string sql = mQueue.front();
|
||||||
|
|
|
@ -479,7 +479,7 @@ void Event::AddFrame(Image *image,
|
||||||
Debug(1, "Writing snapshot");
|
Debug(1, "Writing snapshot");
|
||||||
WriteFrameImage(image, timestamp, snapshot_file.c_str());
|
WriteFrameImage(image, timestamp, snapshot_file.c_str());
|
||||||
} else {
|
} else {
|
||||||
Debug(1, "Not Writing snapshot");
|
Debug(1, "Not Writing snapshot because score %d > max %d", score, max_score);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We are writing an Alarm frame
|
// We are writing an Alarm frame
|
||||||
|
@ -491,7 +491,7 @@ void Event::AddFrame(Image *image,
|
||||||
Debug(1, "Writing alarm image");
|
Debug(1, "Writing alarm image");
|
||||||
WriteFrameImage(image, timestamp, alarm_file.c_str());
|
WriteFrameImage(image, timestamp, alarm_file.c_str());
|
||||||
} else {
|
} else {
|
||||||
Debug(1, "Not Writing alarm image");
|
Debug(3, "Not Writing alarm image because alarm frame already written");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alarm_image and (save_jpegs & 2)) {
|
if (alarm_image and (save_jpegs & 2)) {
|
||||||
|
|
|
@ -239,15 +239,17 @@ function queryRequest($filter, $search, $advsearch, $sort, $offset, $order, $lim
|
||||||
} # end if search
|
} # end if search
|
||||||
|
|
||||||
$sql = 'SELECT ' .$col_str. ' FROM `Events` AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE '.$search_filter->sql().' ORDER BY ' .$sort. ' ' .$order;
|
$sql = 'SELECT ' .$col_str. ' FROM `Events` AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE '.$search_filter->sql().' ORDER BY ' .$sort. ' ' .$order;
|
||||||
ZM\Debug('Calling the following sql query: ' .$sql);
|
|
||||||
$filtered_rows = dbFetchAll($sql);
|
$filtered_rows = dbFetchAll($sql);
|
||||||
ZM\Debug('Have ' . count($filtered_rows) . ' events matching search filter.');
|
ZM\Debug('Have ' . count($filtered_rows) . ' events matching search filter: '.$sql);
|
||||||
} else {
|
} else {
|
||||||
$filtered_rows = $unfiltered_rows;
|
$filtered_rows = $unfiltered_rows;
|
||||||
} # end if search_filter->terms() > 1
|
} # end if search_filter->terms() > 1
|
||||||
|
|
||||||
|
if ($limit)
|
||||||
|
$filtered_rows = array_slice($filtered_rows, $offset, $limit);
|
||||||
|
|
||||||
$returned_rows = array();
|
$returned_rows = array();
|
||||||
foreach ( array_slice($filtered_rows, $offset, $limit) as $row ) {
|
foreach ($filtered_rows as $row) {
|
||||||
$event = new ZM\Event($row);
|
$event = new ZM\Event($row);
|
||||||
|
|
||||||
$scale = intval(5*100*ZM_WEB_LIST_THUMB_WIDTH / $event->Width());
|
$scale = intval(5*100*ZM_WEB_LIST_THUMB_WIDTH / $event->Width());
|
||||||
|
|
Loading…
Reference in New Issue