forked from Public/pics
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:
parent
3fc8ccf550
commit
ed6054e6b6
@ -63,6 +63,7 @@ class ViewPhotoAlbum extends HTMLController
|
|||||||
$buttons = [];
|
$buttons = [];
|
||||||
|
|
||||||
if (Registry::get('user')->isLoggedIn())
|
if (Registry::get('user')->isLoggedIn())
|
||||||
|
{
|
||||||
$buttons[] = [
|
$buttons[] = [
|
||||||
'url' => BASEURL . '/download/?tag=' . $id_tag,
|
'url' => BASEURL . '/download/?tag=' . $id_tag,
|
||||||
'caption' => 'Download this album',
|
'caption' => 'Download this album',
|
||||||
@ -72,6 +73,7 @@ class ViewPhotoAlbum extends HTMLController
|
|||||||
'url' => BASEURL . '/uploadmedia/?tag=' . $id_tag,
|
'url' => BASEURL . '/uploadmedia/?tag=' . $id_tag,
|
||||||
'caption' => 'Upload new photos here',
|
'caption' => 'Upload new photos here',
|
||||||
];
|
];
|
||||||
|
}
|
||||||
if (Registry::get('user')->isAdmin())
|
if (Registry::get('user')->isAdmin())
|
||||||
$buttons[] = [
|
$buttons[] = [
|
||||||
'url' => BASEURL . '/addalbum/?tag=' . $id_tag,
|
'url' => BASEURL . '/addalbum/?tag=' . $id_tag,
|
||||||
|
Loading…
Reference in New Issue
Block a user