From cf2f3ba3f6dc828618c479a731b013244b575236 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Tue, 28 Apr 2026 12:42:58 +0200 Subject: [PATCH] Improve usage in command line --- include/constant.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/constant.php b/include/constant.php index 00cf4ddc5..fdbd0fbd1 100644 --- a/include/constant.php +++ b/include/constant.php @@ -369,16 +369,16 @@ define("ARROWUP","⇧"); // Url of NOALYSS (http://...) // if (!defined("NOALYSS_URL")) { - if ( isset ( $_SERVER)) { - $protocol = "http"; - if (isset ($_SERVER['REQUEST_SCHEME'])) { - $protocol = $_SERVER['REQUEST_SCHEME']; - } - $base = $protocol . '://' . - $_SERVER['SERVER_NAME'] . - ":" . $_SERVER['SERVER_PORT'] . - dirname($_SERVER['PHP_SELF']); - define("NOALYSS_URL", $base); + if ( isset ( $_SERVER['SERVER_NAME'])) { + $protocol = "http"; + if (isset ($_SERVER['REQUEST_SCHEME'])) { + $protocol = $_SERVER['REQUEST_SCHEME']; + } + $base = $protocol . '://' . + $_SERVER['SERVER_NAME'] . + ":" . $_SERVER['SERVER_PORT'] . + dirname($_SERVER['PHP_SELF']); + define("NOALYSS_URL", $base); }else { define("NOALYSS_URL","command-line"); }