Fix the effect of paths on menu selections

This commit is contained in:
毛线
2025-08-28 20:17:57 +08:00
committed by GitHub
parent ae08039323
commit 7963fc270a

View File

@@ -2242,7 +2242,7 @@ function menu ($selected = "home") {
global $USERUPDATESET;
//no this option in config.php
$enablerequest = 'yes';
$script_name = $_SERVER["SCRIPT_FILENAME"];
$script_name = $_SERVER["SCRIPT_NAME"];
if (preg_match("/index/i", $script_name)) {
$selected = "home";
}elseif (preg_match("/forums/i", $script_name)) {