X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/52c35ce10db7cd23f9983484a2ae68d76623245c..db1c2ab0bca87ab94dd8c5208e16a65fa1a4d34a:/foto/index.php diff --git a/foto/index.php b/foto/index.php index 4b61f37..27482a4 100644 --- a/foto/index.php +++ b/foto/index.php @@ -1,23 +1,25 @@ admin('foto')) { - $access = '🔓 Openbaar'; - if (isset($PageAccess)) { - $access = "🔒 Bewoners"; +if ($User->admin('foto')) { + if (!empty($PageAccess)) { + $access = '🔒 Bewoners'; if ($PageAccess != $rootdir) { $access .= sprintf(' vanaf %s', "/$PageAccess", pathinfo($PageAccess, PATHINFO_FILENAME) ); } } + else { + $access = '🔓 Openbaar'; + } print "\n\n"; } $nav = explode('/', $rootdir); $nav[0] = "Foto's"; # override of root 'foto' $title = array_pop($nav); -$Article->title = implode(' ', $nav) . ': ' . $title; +$Article->title = ($nav ? implode(' ', $nav) . ': ' : '') . $title; $link = ''; print "

"; @@ -64,8 +66,8 @@ if ($imgs = glob("$rootdir/*", GLOB_ONLYDIR)) { $html = ''; $html .= "
$album
"; - if (empty($User) and file_exists("$path/.private")) { - $html = ''.$html.''; + if (!$User->login and file_exists("$path/.private")) { + $html = ''.$html.''; } $html = "
$html
";