update last modified date and refactor HTTP host retrieval in Menu class

This commit is contained in:
2026-10-30 16:47:21 +07:00
parent a538cc0cc5
commit cf100a86e2
+2 -2
View File
@@ -5,7 +5,7 @@
Module : /Web/Menu.php Module : /Web/Menu.php
Created By : Siau Pheng ([email protected]). Created By : Siau Pheng ([email protected]).
Created Date : January 16th, 2008. Created Date : January 16th, 2008.
Last Modified : October 21st, 2026. Last Modified : October 30th, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM. (c) 3FONIA Software; WWW.3FONIA.COM.
@@ -141,7 +141,7 @@ final class Menu {
$href1 = '//127.0.0.1/'; $href1 = '//127.0.0.1/';
$href2 = ""; $href2 = "";
} else { } else {
$_host = $this->app->request()->getVar('HTTP_ORIGIN') ?? $this->app->request()->getVar('HTTP_HOST') ?? $this->web_app['PARENT_SITE']; $_host = $_SERVER['HTTP_ORIGIN'] ?? $_SERVER['HTTP_HOST'] ?? $this->web_app['PARENT_SITE'];
$_host = str_replace(['http://','https://'], "", $_host); $_host = str_replace(['http://','https://'], "", $_host);
if ($this->web_app['PARENT_SUB'] === true) { if ($this->web_app['PARENT_SUB'] === true) {
$_subs = explode('.', $_host); $_subs = explode('.', $_host);