mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-01-19 00:57:53 +00:00
var/www/pages/index.php : consistent string delimiters
This commit is contained in:
parent
7948e2600e
commit
43df6cdf2a
1 changed files with 3 additions and 3 deletions
|
@ -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…
Reference in a new issue