From aaa130937764730147670cdbe29b4aec17e7c6dc Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 19 Apr 2021 17:14:30 -0400 Subject: [PATCH 1/7] Use > instead of >= to fix duplicated log entries display --- web/ajax/log.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/ajax/log.php b/web/ajax/log.php index 5f749df6c..6072a340a 100644 --- a/web/ajax/log.php +++ b/web/ajax/log.php @@ -48,7 +48,7 @@ function buildLogQuery($action) { } else { $minTime = strtotime($minTime); } - $where[] = 'TimeKey >= ?'; + $where[] = 'TimeKey > ?'; $values[] = $minTime; } if ( $maxTime ) { @@ -59,7 +59,7 @@ function buildLogQuery($action) { } else { $maxTime = strtotime($maxTime); } - $where[] = 'TimeKey <= ?'; + $where[] = 'TimeKey < ?'; $values[] = $maxTime; } From ffb2d937e1ccfd6b373081e2b36dbfb389517128 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 19 Apr 2021 17:15:20 -0400 Subject: [PATCH 2/7] Revert "Use on-mousedown and on-mouseup if doing continuous" This reverts commit d7fa28142f9b0fc1453d4954152a652c00968a9d. --- web/skins/classic/includes/control_functions.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/web/skins/classic/includes/control_functions.php b/web/skins/classic/includes/control_functions.php index 877563664..61138612f 100644 --- a/web/skins/classic/includes/control_functions.php +++ b/web/skins/classic/includes/control_functions.php @@ -122,16 +122,7 @@ function controlPanTilt($monitor, $cmds) { $hasTilt = $control->CanTilt(); $hasDiag = $hasPan && $hasTilt && $control->CanMoveDiag(); ?> - + From 70313ce152e7c86b2fb88275307909848df8d8d8 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 19 Apr 2021 17:15:35 -0400 Subject: [PATCH 3/7] Revert "Add on-mouseup and on-mousedown processing" This reverts commit e0c0598e13957465086bdb3076d33752d9ee9979. --- web/skins/classic/js/skin.js | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/web/skins/classic/js/skin.js b/web/skins/classic/js/skin.js index 76b8e9ac9..067c39391 100644 --- a/web/skins/classic/js/skin.js +++ b/web/skins/classic/js/skin.js @@ -186,28 +186,6 @@ window.addEventListener("DOMContentLoaded", function onSkinDCL() { window[fnName](ev); }; }); - document.querySelectorAll("button[data-on-mousedown]").forEach(function(el) { - var fnName = el.getAttribute("data-on-mousedown"); - if ( !window[fnName] ) { - console.error("Nothing found to bind to " + fnName + " on element " + el.name); - return; - } - - el.onmousedown = function(ev) { - window[fnName](ev); - }; - }); - document.querySelectorAll("button[data-on-mouseup]").forEach(function(el) { - var fnName = el.getAttribute("data-on-mouseup"); - if ( !window[fnName] ) { - console.error("Nothing found to bind to " + fnName + " on element " + el.name); - return; - } - - el.onmouseup = function(ev) { - window[fnName](ev); - }; - }); // 'data-on-click-true' calls the global function in the attribute value with no arguments when a click happens. document.querySelectorAll("a[data-on-click-true], button[data-on-click-true], input[data-on-click-true]").forEach(function attachOnClick(el) { From c0eb790e45426405585011c4eace52999056e1f6 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 2 Feb 2021 23:19:06 -0500 Subject: [PATCH 4/7] Fix colour shift in Crop function due to not multiplying x position by colours --- src/zm_image.cpp | 6 +++--- web/api/app/Plugin/Crud | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/zm_image.cpp b/src/zm_image.cpp index 6129707f1..579a19371 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -1416,9 +1416,9 @@ bool Image::Crop( unsigned int lo_x, unsigned int lo_y, unsigned int hi_x, unsig unsigned int new_stride = new_width * colours; for ( unsigned int y = lo_y, ny = 0; y <= hi_y; y++, ny++ ) { - unsigned char *pbuf = &buffer[((y*linesize)+lo_x)]; - unsigned char *pnbuf = &new_buffer[(ny*new_width)*colours]; - memcpy( pnbuf, pbuf, new_stride ); + unsigned char *pbuf = &buffer[((y*linesize)+(lo_x*colours))]; + unsigned char *pnbuf = &new_buffer[ny*new_stride]; + memcpy(pnbuf, pbuf, new_stride); } AssignDirect(new_width, new_height, colours, subpixelorder, new_buffer, new_size, ZM_BUFTYPE_ZM); diff --git a/web/api/app/Plugin/Crud b/web/api/app/Plugin/Crud index 14292374c..0bd63fb46 160000 --- a/web/api/app/Plugin/Crud +++ b/web/api/app/Plugin/Crud @@ -1 +1 @@ -Subproject commit 14292374ccf1328f2d5db20897bd06f99ba4d938 +Subproject commit 0bd63fb464957080ead342db58ca9e01532cf1ef From 7485735e9c19769a2a49e7c5050a0e20e4591364 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 30 Mar 2021 16:03:50 -0400 Subject: [PATCH 5/7] Change url used for authentication to magicBox.cgi?action=getDeviceType --- scripts/ZoneMinder/lib/ZoneMinder/Control/Amcrest_HTTP.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Control/Amcrest_HTTP.pm b/scripts/ZoneMinder/lib/ZoneMinder/Control/Amcrest_HTTP.pm index 59e4f7511..df7bed42c 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Control/Amcrest_HTTP.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Control/Amcrest_HTTP.pm @@ -75,7 +75,7 @@ sub open { } # Detect REALM, has to be /cgi-bin/ptz.cgi because just / accepts no auth - my $res = $self->{ua}->get($$self{base_url}.'cgi-bin/ptz.cgi'); + my $res = $self->{ua}->get($$self{base_url}.'cgi-bin/magicBox.cgi?action=getDeviceType'); if ( $res->is_success ) { $self->{state} = 'open'; @@ -121,7 +121,7 @@ sub open { Debug('No headers line'); } # end if headers } else { - Error("Failed to get $$self{base_url}cgi-bin/ptz.cgi ".$res->status_line()); + Error("Failed to get $$self{base_url}cgi-bin/magicBox.cgi?action=getDeviceType ".$res->status_line()); } # end if $res->status_line() eq '401 Unauthorized' From ed58447c4d6de552d934136c7051246d17b3d70e Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 19 Apr 2021 17:53:08 -0400 Subject: [PATCH 6/7] Only update event StorageId when the new StorageId has a value --- scripts/zmaudit.pl.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/zmaudit.pl.in b/scripts/zmaudit.pl.in index e57d98add..22180973c 100644 --- a/scripts/zmaudit.pl.in +++ b/scripts/zmaudit.pl.in @@ -308,7 +308,7 @@ MAIN: while( $loop ) { } else { my $full_path = join('/', $Storage->Path(), $day_dir, $event_path); # Check storage id - if ( !$Event->Storage()->Id() ) { + if ( $Storage->Id() and !$Event->Storage()->Id() ) { Info("Correcting StorageId for event $$Event{Id} from $$Event{StorageId} $$Event{Path} to $$Storage{Id} $full_path"); $Event->save({ StorageId=>$Storage->Id() }); $Event->Path(undef); From ed39ffeeb62dc70e9f248a67e3de90da0d31cc82 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 19 Apr 2021 18:39:02 -0400 Subject: [PATCH 7/7] Bump version to 1.34.26 --- distros/redhat/zoneminder.spec | 2 +- version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index e9a0dc283..edab5810d 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -28,7 +28,7 @@ %global _hardened_build 1 Name: zoneminder -Version: 1.34.24 +Version: 1.34.25 Release: 1%{?dist} Summary: A camera monitoring and analysis tool Group: System Environment/Daemons diff --git a/version b/version index 33b87d63a..cd79d20e7 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.34.25 +1.34.26