From d5f9eb11c624a3a24cb3f1159f6f235816851f68 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 16 Oct 2021 18:30:55 -0400 Subject: [PATCH] WHen saving v4l settings redirect back to watch instead of console. --- web/includes/actions/settings.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/includes/actions/settings.php b/web/includes/actions/settings.php index a4aa1b489..710bfa641 100644 --- a/web/includes/actions/settings.php +++ b/web/includes/actions/settings.php @@ -20,18 +20,18 @@ // Monitor control actions, require a monitor id and control view permissions for that monitor -if ( empty($_REQUEST['mid']) ) { +if (empty($_REQUEST['mid'])) { ZM\Warning('Settings requires a monitor id'); return; } -if ( ! canView('Control', $_REQUEST['mid']) ) { +if (!canView('Control', $_REQUEST['mid'])) { ZM\Warning('Settings requires the Control permission'); return; } require_once('includes/Monitor.php'); $mid = validInt($_REQUEST['mid']); -if ( $action == 'settings' ) { +if ($action == 'settings') { $args = ' -m ' . escapeshellarg($mid); $args .= ' -B' . escapeshellarg($_REQUEST['newBrightness']); $args .= ' -C' . escapeshellarg($_REQUEST['newContrast']); @@ -45,5 +45,7 @@ if ( $action == 'settings' ) { dbQuery( 'UPDATE Monitors SET Brightness = ?, Contrast = ?, Hue = ?, Colour = ? WHERE Id = ?', array($brightness, $contrast, $hue, $colour, $mid)); + global $redirect; + $redirect = '?view=watch&mid='.$mid; } ?>