Merge branch 'master' into zma_to_thread

This commit is contained in:
Isaac Connor 2021-01-14 13:02:52 -05:00
commit f2fea95f4b
4 changed files with 554 additions and 392 deletions

View File

@ -163,16 +163,17 @@ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
my $delay = $Config{ZM_FILTER_EXECUTE_INTERVAL};
my $event_id = 0;
if ( ! EVENT_PATH ) {
Error("No event path defined. Config was $Config{ZM_DIR_EVENTS}");
if ( !EVENT_PATH ) {
Error('No event path defined. Config was '.$Config{ZM_DIR_EVENTS});
die;
}
# In future, should not be neccessary wrt StorageAreas
chdir( EVENT_PATH );
chdir(EVENT_PATH);
# Should not be neccessary... but nice to get a local var. What if it fails?
my $dbh = zmDbConnect();
$dbh->do('SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED');
if ( $filter_name ) {
Info("Scanning for events using filter '$filter_name'");

View File

@ -24,7 +24,7 @@ if ( !canEdit('Control') ) {
return;
} // end if !canEdit Controls
if ( $action == 'controlcap' ) {
if ( $action == 'Save' ) {
require_once('includes/Control.php');
$Control = new ZM\Control( !empty($_REQUEST['cid']) ? $_REQUEST['cid'] : null );
@ -82,13 +82,13 @@ if ( $action == 'controlcap' ) {
# Checkboxes don't return an element in the POST data, so won't be present in newControl.
# So force a value for these fields
foreach ( $field_defaults as $field => $value ) {
if ( ! (isset($_REQUEST['newControl'][$field]) and $_REQUEST['newControl'][$field]) ) {
$_REQUEST['newControl'][$field] = $value;
if ( ! (isset($_REQUEST['Control'][$field]) and $_REQUEST['Control'][$field]) ) {
$_REQUEST['Control'][$field] = $value;
}
} # end foreach type
//$changes = getFormChanges( $control, $_REQUEST['newControl'], $types, $columns );
$Control->save($_REQUEST['newControl']);
$Control->save($_REQUEST['Control']);
$redirect = '?view=controlcaps';
} // end if action
?>

View File

@ -168,6 +168,9 @@ input[disabled] {
color: #888888;
}
.modal img {
max-width: 100%;
}
img {
display: inline-block;
}

File diff suppressed because it is too large Load Diff