mirror of
https://github.com/sigmasternchen/mobmash.click
synced 2025-03-15 08:09:02 +00:00
fix: Trailing slashes break the menu
This commit is contained in:
parent
9360ceb8b5
commit
16faa9ea95
1 changed files with 3 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<?php
|
||||
function makeNavigationLink(string $name, string $url) {
|
||||
$currentPath = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||
$targetPath = parse_url($url, PHP_URL_PATH);
|
||||
function makeNavigationLink(string $name, string $url): void {
|
||||
$currentPath = rtrim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), "/");
|
||||
$targetPath = rtrim(parse_url($url, PHP_URL_PATH), "/");
|
||||
$targetHost = parse_url($_SERVER['REQUEST_URI'], PHP_URL_HOST);
|
||||
$active = false;
|
||||
if ($targetHost === NULL && $currentPath === $targetPath) {
|
||||
|
|
Loading…
Reference in a new issue