<?php
global $User;
+if (isset($Page->place[0])) {
+ $Page->link .= '/'.$Page->place[0];
+}
$cal = [];
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;
}
}
+if (!$cal) {
+ return;
+}
$year = 3600 * 24 * 365; # seconds per year
$scale = 7; # em width per year