From: Mischa POSLAWSKY Date: Sat, 12 Dec 2020 14:16:29 +0000 (+0100) Subject: nieuws: article index on sitemap request X-Git-Tag: v5.0~15 X-Git-Url: http://git.shiar.nl/minimedit.git/commitdiff_plain/caa254384466d5f8477de38fcf7492a1ecd3f938 nieuws: article index on sitemap request Restore subpages ignored since previous commit. --- 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;