Merge branch 'master' into storageareas

This commit is contained in:
Isaac Connor 2019-01-05 10:16:38 -05:00
commit 8eb61b1c11
7 changed files with 123 additions and 34 deletions

View File

@ -1,6 +1,6 @@
**THIS FORUM IS FOR BUG REPORTS ONLY**
Do not post feature or enhancement requests, general discussions or support questions here.
Do not post feature or enhancement requests, general discussions, or support questions here.
Feature and enhancement requests, general discussions, and support questions should occur in one of the following areas:
@ -9,7 +9,9 @@ Feature and enhancement requests, general discussions, and support questions sho
Docker related issues should be posted here: https://github.com/ZoneMinder/zmdockerfiles
In order to submit a bug report, please populate the fields below. This is required.
In order to submit a bug report, please populate the fields below this line. This is required.
----------------------------------------------------------------------------------------------------
**Describe Your Environment**
- Version of ZoneMinder [release version, development version, or commit]

39
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,39 @@
---
name: Bug report
about: Issues that do not follow the template will be closed
title: ''
labels: ''
assignees: ''
---
**Describe Your Environment**
- Version of ZoneMinder [release version, development version, or commit]
- How you installed ZoneMinder [e.g. PPA, RPMFusion, from-source, etc]
- Full name and version of OS
**If the issue concerns a camera**
- Make and Model
- frame rate
- resolution
- ZoneMinder Source Type:
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Debug Logs**
```
<insert debug logs here, please make sure they are within the ``` quotes so they are formatted properly>
```

16
.github/issue-close-app.yml vendored Normal file
View File

@ -0,0 +1,16 @@
# Comment that will be sent if an issue is judged to be closed
comment: "This issue is closed because it does not meet our bug report issue template. Please read it."
issueConfigs:
# There can be several configs for different kind of issues.
- content:
# Example 1: bug report
- "Describe Your Environment"
- "Describe the bug"
- "Expected behavior"
# Optional configuration:
#
# whether the keywords are case-insensitive
# default value is false, which means keywords are case-sensitive
caseInsensitive: true
# The issue is judged to be legal if it includes all keywords from any of these two configs.
# Or it will be closed by the app.

View File

@ -0,0 +1,47 @@
<?php
//
// ZoneMinder web action file
// Copyright (C) 2019 ZoneMinder LLC
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
if ( !isset($_REQUEST['markEids']) ) {
Warning('Events actions require eids');
return;
}
// Event scope actions, view permissions only required
if ( !canEdit('Events') ) {
Warning("Events actions require Edit permissions");
return;
} // end if ! canEdit(Events)
if ( $action == 'eventdetail' ) {
$dbConn->beginTransaction();
foreach ( $_REQUEST['markEids'] as $markEid ) {
dbQuery('UPDATE Events SET Cause=?, Notes=? WHERE Id=?',
array(
$_REQUEST['newEvent']['Cause'],
$_REQUEST['newEvent']['Notes'],
$markEid
)
);
}
$dbConn->commit();
$refreshParent = true;
$closePopup = true;
}
?>

View File

@ -29,21 +29,7 @@ if ( !canEdit('Events') ) {
return;
} // end if ! canEdit(Events)
if ( $action == 'eventdetail' ) {
$dbConn->beginTransaction();
foreach ( getAffectedIds('eids') as $markEid ) {
dbQuery('UPDATE Events SET Cause=?, Notes=? WHERE Id=?',
array(
$_REQUEST['newEvent']['Cause'],
$_REQUEST['newEvent']['Notes'],
$markEid
)
);
}
$dbConn->commit();
$refreshParent = true;
$closePopup = true;
} else if ( $action == 'archive' ) {
if ( $action == 'archive' ) {
$dbConn->beginTransaction();
foreach( getAffectedIds('markEid') as $markEid ) {
dbQuery('UPDATE Events SET Archived=? WHERE Id=?', array(1, $markEid));

View File

@ -33,10 +33,10 @@ if ( isset($_REQUEST['eid']) ) {
$sqlValues = array();
foreach ( $_REQUEST['eids'] as $eid ) {
$sqlWhere[] = 'E.Id = ?';
$sqlValues[] = $eid;
$sqlValues[] = validInt($eid);
}
unset($eid);
$sql .= join( " or ", $sqlWhere );
$sql .= join(' OR ', $sqlWhere);
foreach( dbFetchAll( $sql, NULL, $sqlValues ) as $row ) {
if ( !isset($newEvent) ) {
$newEvent = $row;
@ -75,27 +75,24 @@ if ( $mode == 'single' ) {
</div>
<div id="content">
<form name="contentForm" id="contentForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<input type="hidden" name="view" value="none"/>
<input type="hidden" name="action" value="eventdetail"/>
<input type="hidden" name="view" value="<?php echo $view ?>"/>
<?php
if ( $mode == 'single' ) {
?>
<input type="hidden" name="view" value="<?php echo $view ?>"/>
<input type="hidden" name="action" value="eventdetail"/>
<input type="hidden" name="eid" value="<?php echo $eid ?>"/>
<input type="hidden" name="markEids[]" value="<?php echo validInt($eid) ?>"/>
<?php
} else if ( $mode = 'multi' ) {
?>
<input type="hidden" name="view" value="none"/>
<input type="hidden" name="action" value="eventdetail"/>
<?php
foreach ( $_REQUEST['eids'] as $eid ) {
?>
<input type="hidden" name="markEids[]" value="<?php echo validHtmlStr($eid) ?>"/>
<input type="hidden" name="markEids[]" value="<?php echo validInt($eid) ?>"/>
<?php
}
}
?>
<table id="contentTable" class="major" cellspacing="0">
<table id="contentTable" class="major">
<tbody>
<tr>
<th scope="row"><?php echo translate('Cause') ?></th>
@ -108,8 +105,10 @@ if ( $mode == 'single' ) {
</tbody>
</table>
<div id="contentButtons">
<input type="submit" value="<?php echo translate('Save') ?>"<?php if ( !canEdit( 'Events' ) ) { ?> disabled="disabled"<?php } ?>/>
<input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow()"/>
<button type="submit" value="Save" <?php echo !canEdit('Events') ? ' disabled="disabled"' : '' ?>>
<?php echo translate('Save') ?>
</button>
<button type="button" onclick="closeWindow()"><?php echo translate('Cancel') ?></button>
</div>
</form>
</div>

View File

@ -103,7 +103,7 @@ if ( empty($_REQUEST['path']) ) {
if ( !$Frame )
$Frame = Frame::find_one(array('EventId'=>$_REQUEST['eid']));
if ( !$Frame ) {
Warning("No frame found for event " + $_REQUEST['eid']);
Warning('No frame found for event ' . $_REQUEST['eid']);
$Frame = new Frame();
$Frame->Delta(1);
$Frame->FrameId('snapshot');