$title = array_pop($nav);
$Page->title = ($nav ? implode(' ', $nav) . ': ' : '') . $title;
-if (!$User) {
+if ($Page->api) {
$img = "$rootdir/index.jpg";
if (file_exists($img)) {
# cover image of current album
$Page->image = "/$img";
}
if (!$Page->path) {
- return glob("$rootdir/*", GLOB_ONLYDIR); #TODO: recurse
+ return array_map(function ($dir) {
+ return new ArchiveArticle($dir . '/index.html');
+ }, glob("$rootdir/*", GLOB_ONLYDIR)); #TODO: recurse
}
return;
}