From 727db3547124e4231c6d8292f54be88026c41a5d Mon Sep 17 00:00:00 2001 From: Philipp Mundhenk Date: Fri, 11 Oct 2024 18:30:01 +0000 Subject: [PATCH] more js fixes --- html/scan.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/scan.php b/html/scan.php index df9fc84..8490893 100644 --- a/html/scan.php +++ b/html/scan.php @@ -8,7 +8,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { $target = $_POST["target"]; -} elseif ($_SERVER['REQUEST_METHOD'] == 'GET') { +} else if ($_SERVER['REQUEST_METHOD'] == 'GET') { $target = $_GET["target"]; } @@ -20,7 +20,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // return immediately $handle = popen('sudo -b -u \#'.$UID.' /opt/brother/scanner/brscan-skey/script/scanto'.$target.'.py', 'r'); - } elseif ($_SERVER['REQUEST_METHOD'] == 'GET') { + } else if ($_SERVER['REQUEST_METHOD'] == 'GET') { // wait for completion $output=shell_exec('sudo -u \#'.$UID.' /opt/brother/scanner/brscan-skey/script/scanto'.$target.'.py'); }