page: search results as article objects
[minimedit.git] / foto / index.php
index c2cc95c730a37361bc82143085340dc8593df233..7df1d5c26daa1c27ed9efda43531f6997fe96d4e 100644 (file)
@@ -12,6 +12,11 @@ if (!$User) {
                # cover image of current album
                $Page->image = "/$img";
        }
+       if (!$Page->path) {
+               return array_map(function ($dir) {
+                       return new ArchiveArticle($dir . '/index.html');
+               }, glob("$rootdir/*", GLOB_ONLYDIR)); #TODO: recurse
+       }
        return;
 }