diff options
Diffstat (limited to 'src/usr/local/www/pkg_mgr_install.php')
-rw-r--r-- | src/usr/local/www/pkg_mgr_install.php | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index b5ce5b0..771fe6c 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -221,23 +221,20 @@ function waitfor_string_in_file($filename, $string, $timeout) { } $pkgmode = ''; -if (!empty($_POST['mode'])) { - $pkgmode = $_POST['mode']; -} elseif (!empty($_GET['mode'])) { - $pkgmode = $_GET['mode']; -} +if (!empty($_REQUEST['mode'])) { + $valid_modes = array( + 'reinstallall', + 'reinstallpkg', + 'delete', + 'installed' + ); + + if (!in_array($_REQUEST['mode'], $valid_modes)) { + header("Location: pkg_mgr_installed.php"); + return; + } -$valid_modes = array( - '', - 'reinstallall', - 'reinstallpkg', - 'delete', - 'installed' -); - -if (!in_array($pkgmode, $valid_modes)) { - header("Location: pkg_mgr_installed.php"); - return; + $pkgmode = $_REQUEST['mode']; } if ($_POST) { |