avoid excess ampersands

This commit is contained in:
Shish 2020-04-02 22:38:50 +01:00
parent 1d389f0156
commit 0039aafe94

View file

@ -38,7 +38,7 @@ function make_link(?string $page=null, ?string $query=null, ?string $fragment=nu
$parts['path'] = "$install_dir/$page"; $parts['path'] = "$install_dir/$page";
} else { } else {
$parts['path'] = "$install_dir/index.php"; $parts['path'] = "$install_dir/index.php";
$query = "q=$page&$query"; $query = empty($query) ? "q=$page" : "q=$page&$query";
} }
$parts['query'] = $query; // http_build_query($query); $parts['query'] = $query; // http_build_query($query);
$parts['fragment'] = $fragment; // http_build_query($hash); $parts['fragment'] = $fragment; // http_build_query($hash);