mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-02-23 20:33:57 +00:00
var/www/pages/index.php : consistent string delimiters
This commit is contained in:
parent
7948e2600e
commit
43df6cdf2a
@ -43,7 +43,7 @@ if (substr($git_root, 0, strlen($git_prefix)) !== $git_prefix) {
|
||||
send_response(404, "this user/organization does not have codeberg pages");
|
||||
}
|
||||
|
||||
if (end($parts) === '') {
|
||||
if (end($parts) === "") {
|
||||
array_pop($parts);
|
||||
}
|
||||
|
||||
@ -53,8 +53,8 @@ $file_url = implode("/", $parts);
|
||||
$command = "sh -c \"cd '$git_root' && /usr/bin/git ls-tree 'master:$file_url' > /dev/null\"";
|
||||
exec($command, $output, $retval);
|
||||
if ($retval === 0) {
|
||||
if ($file_url !== '')
|
||||
$file_url .= '/';
|
||||
if ($file_url !== "")
|
||||
$file_url .= "/";
|
||||
$file_url .= "index.html";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user