doclist: link directory index pages
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 22 Sep 2021 12:21:54 +0000 (14:21 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 22 Sep 2021 15:01:08 +0000 (17:01 +0200)
widget/doclist.php

index 123271bf63e024bd1292dc9253234b4782f364b6..e0751b0df77b1c593189c860ba4c824cfca64911 100644 (file)
@@ -13,7 +13,7 @@ foreach (glob("{$Page->link}/2*") as $url) {
        if (!isset($cal[$group][$date])) {
                $cal[$group][$date] = [];
        }
-       if (!is_dir($url) and filesize($url)) {
+       if (is_dir($url) ? file_exists("$url/index.html") : filesize($url)) {
                $cal[$group][$date][$suffix] = $link;
        }
 }