Fix buttons appearing when they shouldn't.

This bug went unnoticed because people who aren't logged in can't actually see this page.
This commit is contained in:
Aaron van Geffen 2019-09-29 14:05:45 +02:00
parent 3fc8ccf550
commit ed6054e6b6

View File

@ -63,6 +63,7 @@ class ViewPhotoAlbum extends HTMLController
$buttons = [];
if (Registry::get('user')->isLoggedIn())
{
$buttons[] = [
'url' => BASEURL . '/download/?tag=' . $id_tag,
'caption' => 'Download this album',
@ -72,6 +73,7 @@ class ViewPhotoAlbum extends HTMLController
'url' => BASEURL . '/uploadmedia/?tag=' . $id_tag,
'caption' => 'Upload new photos here',
];
}
if (Registry::get('user')->isAdmin())
$buttons[] = [
'url' => BASEURL . '/addalbum/?tag=' . $id_tag,