X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/772961fd4e9be46ad340cad1e55ee5f28cc5b968..2ec9c2255379e0a0a6043bbb129d34900e17c6be:/foto/index.php?ds=inline diff --git a/foto/index.php b/foto/index.php index 0acd44e..c2cc95c 100644 --- a/foto/index.php +++ b/foto/index.php @@ -1,6 +1,20 @@ link; +$nav = explode('/', $rootdir); +$nav[0] = "Foto's"; # override of root 'foto' +$title = array_pop($nav); +$Page->title = ($nav ? implode(' ', $nav) . ': ' : '') . $title; + +if (!$User) { + $img = "$rootdir/index.jpg"; + if (file_exists($img)) { + # cover image of current album + $Page->image = "/$img"; + } + return; +} + if ($User->admin('foto')) { if ($Page->restricted) { $access = '🔒 Bewoners'; @@ -16,11 +30,6 @@ if ($User->admin('foto')) { print "\n\n"; } -$nav = explode('/', $rootdir); -$nav[0] = "Foto's"; # override of root 'foto' -$title = array_pop($nav); -$Page->title = ($nav ? implode(' ', $nav) . ': ' : '') . $title; - $link = ''; print "