Improve usage in command line

This commit is contained in:
sparkyx 2026-04-28 12:42:58 +02:00
parent 160490215d
commit cf2f3ba3f6

View file

@ -369,16 +369,16 @@ define("ARROWUP","⇧");
// Url of NOALYSS (http://...) // Url of NOALYSS (http://...)
// //
if (!defined("NOALYSS_URL")) { if (!defined("NOALYSS_URL")) {
if ( isset ( $_SERVER)) { if ( isset ( $_SERVER['SERVER_NAME'])) {
$protocol = "http"; $protocol = "http";
if (isset ($_SERVER['REQUEST_SCHEME'])) { if (isset ($_SERVER['REQUEST_SCHEME'])) {
$protocol = $_SERVER['REQUEST_SCHEME']; $protocol = $_SERVER['REQUEST_SCHEME'];
} }
$base = $protocol . '://' . $base = $protocol . '://' .
$_SERVER['SERVER_NAME'] . $_SERVER['SERVER_NAME'] .
":" . $_SERVER['SERVER_PORT'] . ":" . $_SERVER['SERVER_PORT'] .
dirname($_SERVER['PHP_SELF']); dirname($_SERVER['PHP_SELF']);
define("NOALYSS_URL", $base); define("NOALYSS_URL", $base);
}else { }else {
define("NOALYSS_URL","command-line"); define("NOALYSS_URL","command-line");
} }