Skip to content

Commit c1fe4a6

Browse files
Merge remote-tracking branch 'upstream/master' into ai_server
2 parents e8fffc8 + a7c6238 commit c1fe4a6

File tree

16 files changed

+7079
-29
lines changed

16 files changed

+7079
-29
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = {
2424
"camelcase": "off",
2525
"comma-dangle": "off",
2626
"guard-for-in": "off",
27+
"operator-linebreak": "off",
2728
"max-len": "off",
2829
"new-cap": ["error", {
2930
capIsNewExceptions: ["Error", "Warning", "Debug", "Polygon_calcArea", "Play", "Stop", "Panzoom"],

db/zm_create.sql.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ CREATE TABLE `MonitorPresets` (
483483
`ControlDevice` varchar(255) default NULL,
484484
`ControlAddress` varchar(255) default NULL,
485485
`DefaultRate` smallint(5) unsigned NOT NULL default '100',
486-
`DefaultScale` smallint(5) unsigned NOT NULL default '100',
486+
`DefaultScale` CHAR(6) NOT NULL default '0',
487487
PRIMARY KEY (`Id`)
488488
) ENGINE=@ZM_MYSQL_ENGINE@;
489489

@@ -615,7 +615,7 @@ CREATE TABLE `Monitors` (
615615
`ReturnDelay` smallint(5) unsigned,
616616
`ModectDuringPTZ` tinyint(3) unsigned NOT NULL default '0',
617617
`DefaultRate` smallint(5) unsigned NOT NULL default '100',
618-
`DefaultScale` smallint(5) unsigned NOT NULL default '100',
618+
`DefaultScale` CHAR(6) NOT NULL default '0',
619619
`DefaultCodec` enum('auto','MP4','MJPEG') NOT NULL default 'auto',
620620
`SignalCheckPoints` INT UNSIGNED NOT NULL default '0',
621621
`SignalCheckColour` varchar(32) NOT NULL default '#0000BE',

db/zm_update-1.37.72.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE Monitors MODIFY DefaultScale CHAR(6) NOT NULL default '0';

distros/fedora

Lines changed: 0 additions & 1 deletion
This file was deleted.

distros/opensuse/redalert.wav

Lines changed: 0 additions & 1 deletion
This file was deleted.

distros/opensuse/redalert.wav

44.3 KB
Binary file not shown.

distros/redhat/zoneminder.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
%global zmtargetdistro %{?rhel:el%{rhel}}%{!?rhel:fc%{fedora}}
2121

2222
Name: zoneminder
23-
Version: 1.37.71
23+
Version: 1.37.72
2424
Release: 1%{?dist}
2525
Summary: A camera monitoring and analysis tool
2626
Group: System Environment/Daemons

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.37.71
1+
1.37.72

web/includes/Monitor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ public static function getRTSP2WebStreamOptions() {
349349
'MQTT_Enabled' => array('type'=>'boolean','default'=>0),
350350
'MQTT_Subscriptions' => '',
351351
'StartupDelay' => 0,
352+
'initial_scale' => array('default'=>100, 'do_not_update'=>1),
352353
);
353354
private $status_fields = array(
354355
'Status' => null,
@@ -549,7 +550,7 @@ public function Monitor_Status() {
549550
}
550551

551552
public function getStreamSrc($args, $querySep='&') {
552-
$streamSrc = $this->Server()->UrlToZMS(ZM_MIN_STREAMING_PORT ? ZM_MIN_STREAMING_PORT+(int)($this->{'Id'}/5) : null);
553+
$streamSrc = $this->Server()->UrlToZMS(ZM_MIN_STREAMING_PORT ? ZM_MIN_STREAMING_PORT+(int)($this->{'Id'}/5)+1 : null);
553554

554555
$args['monitor'] = $this->{'Id'};
555556

@@ -879,6 +880,7 @@ function Groups($new='') {
879880
}
880881
return $this->Groups;
881882
}
883+
882884
function connKey($new='') {
883885
if ($new)
884886
$this->connKey = $new;

web/includes/functions.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,16 @@ function getEventDefaultVideoPath($event) {
362362

363363
function deletePath( $path ) {
364364
ZM\Debug('Deleting '.$path);
365-
if (is_dir($path)) {
366-
system(escapeshellcmd('rm -rf '.$path));
365+
if (is_link($path)) {
366+
if (!unlink($path)) ZM\Debug("Failed to unlink $path");
367+
} else if (is_dir($path)) {
368+
if (false === ($output = system('rm -rf "'.escapeshellcmd($path).'"'))) {
369+
ZM\Warning('Failed doing rm -rf "'.escapeshellcmd($path).'"');
370+
}
367371
} else if (file_exists($path)) {
368-
unlink($path);
372+
if (!unlink($path)) ZM\Debug("Failed to delete $path");
373+
} else {
374+
ZM\Warning("Path $path does not exist in deletePath()");
369375
}
370376
}
371377

0 commit comments

Comments
 (0)