From 5d990501f647e9821a3df90880f38417d9b2ffe9 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Mon, 15 Jan 2024 11:25:04 +0100 Subject: [PATCH] ViewPhotoAlbum: move $is_person declaration to where it's used --- controllers/ViewPhotoAlbum.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/controllers/ViewPhotoAlbum.php b/controllers/ViewPhotoAlbum.php index f4e7f77..519ef30 100644 --- a/controllers/ViewPhotoAlbum.php +++ b/controllers/ViewPhotoAlbum.php @@ -89,8 +89,11 @@ class ViewPhotoAlbum extends HTMLController $this->page->adopt($index); } + // Are we viewing a person tag? + $is_person = $tag->kind === 'Person'; + // Load a photo mosaic for the current tag. - list($mosaic, $total_count) = $this->getPhotoMosaic($id_tag, $id_user_uploaded, $current_page, !isset($is_person)); + list($mosaic, $total_count) = $this->getPhotoMosaic($id_tag, $id_user_uploaded, $current_page, !$is_person); if (isset($mosaic)) { $index = new PhotosIndex($mosaic, Registry::get('user')->isAdmin()); @@ -235,7 +238,6 @@ class ViewPhotoAlbum extends HTMLController { $back_link = BASEURL . '/people/'; $back_link_title = 'Back to "People"'; - $is_person = true; } $description = !empty($tag->description) ? $tag->description : '';