diff --git a/install/index.php b/install/index.php index 59dc371c0..efc2dc891 100644 --- a/install/index.php +++ b/install/index.php @@ -36,13 +36,13 @@ function is_https() { } if (is_https()) { - $html_scheme = "https"; + $http_scheme = "https"; } else { - $html_scheme = "http"; + $http_scheme = "http"; } global $installer_url; -$installer_url = $html_scheme . '://' . $_SERVER['HTTP_HOST'] . '/' . substr(str_replace(["index.php", "/install/"], "", $_SERVER['REQUEST_URI']), 1) . '/install'; +$installer_url = $http_scheme . '://' . $_SERVER['HTTP_HOST'] . '/' . substr(str_replace(["index.php", "/install/"], "", $_SERVER['REQUEST_URI']), 1) . '/install'; // Config Paths $db_config_path = '../application/config/'; @@ -184,9 +184,8 @@ if ($_POST) { if (!isset($message)) { sleep(1); $ch = curl_init(); - $protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https" : "http"; list($realHost,) = explode(':', $_SERVER['HTTP_HOST']); - $wavelog_url = $protocol . "://" . $realHost . ":" . $_SERVER['SERVER_PORT']; + $wavelog_url = $http_scheme . "://" . $realHost . ":" . $_SERVER['SERVER_PORT']; curl_setopt($ch, CURLOPT_URL, $wavelog_url); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); @@ -194,7 +193,7 @@ if ($_POST) { curl_setopt($ch, CURLOPT_URL, $wavelog_url . "/index.php/update/dxcc"); $result = curl_exec($ch); delDir(getcwd()); - header('Location: ' . $protocol . "://" . $_SERVER['HTTP_HOST'] . '/' . $_POST['directory']); + header('Location: ' . $http_scheme . "://" . $_SERVER['HTTP_HOST'] . '/' . $_POST['directory']); exit; } } else { @@ -467,13 +466,13 @@ global $wavelog_url;
- + " class="form-control" name="directory" aria-describedby="main-url" />
- " class="form-control" name="websiteurl" /> + " class="form-control" name="websiteurl" />