From ed6054e6b677c24a7327c35e3025d91fde3a6ac2 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 29 Sep 2019 14:05:45 +0200 Subject: [PATCH] Fix buttons appearing when they shouldn't. This bug went unnoticed because people who aren't logged in can't actually see this page. --- controllers/ViewPhotoAlbum.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/ViewPhotoAlbum.php b/controllers/ViewPhotoAlbum.php index 56debc39..aa0f10a7 100644 --- a/controllers/ViewPhotoAlbum.php +++ b/controllers/ViewPhotoAlbum.php @@ -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,