From: ROllerozxa Date: Sun, 9 Apr 2023 21:20:27 +0000 (+0200) Subject: Don't show "up a folder" on root (LOL) X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=d9c8b0e58f95b199ab2ed7c02e0a68b0c5a05a86;p=dirlistozxa.git Don't show "up a folder" on root (LOL) --- diff --git a/dirlistozxa.php b/dirlistozxa.php index 2efbd25..a3b53f7 100644 --- a/dirlistozxa.php +++ b/dirlistozxa.php @@ -20,7 +20,7 @@ function row($name, $date, $size) { } function build_blocks($items) { - global $ignore_file_list, $path; + global $ignore_file_list, $path, $folder; $rtn = ''; @@ -39,7 +39,8 @@ function build_blocks($items) { natsort($objects['directories']); natsort($objects['files']); - $rtn .= row('../', '-', '-'); + if ($folder != '/') + $rtn .= row('../', '-', '-'); foreach ($objects['directories'] as $dir) { $name = basename($dir).'/';