From caa254384466d5f8477de38fcf7492a1ecd3f938 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 12 Dec 2020 15:16:29 +0100 Subject: [PATCH] nieuws: article index on sitemap request Restore subpages ignored since previous commit. --- foto/index.php | 3 +++ nieuws/index.php | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/foto/index.php b/foto/index.php index c2cc95c..1e973c7 100644 --- a/foto/index.php +++ b/foto/index.php @@ -12,6 +12,9 @@ if (!$User) { # cover image of current album $Page->image = "/$img"; } + if (!$Page->path) { + return glob("$rootdir/*", GLOB_ONLYDIR); #TODO: recurse + } return; } diff --git a/nieuws/index.php b/nieuws/index.php index 59b24a4..507f493 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -2,7 +2,10 @@ $replyform = $Page->handler == 'melding' && $User->login; @list ($year, $page) = explode('/', trim($Page->path, '/')); -if (!$User) return; +if (!$User) { + if ($Page->path) return; + return array_keys((new PageSearch($Page->link))->files()); +} if ($User->admin("edit {$Page->handler}")) { $Page->raw = ''."\n" . $Page->raw; -- 2.30.0