Allow users to filter albums by contributors #48
@ -89,8 +89,11 @@ class ViewPhotoAlbum extends HTMLController
|
|||||||
$this->page->adopt($index);
|
$this->page->adopt($index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Are we viewing a person tag?
|
||||||
|
$is_person = $tag->kind === 'Person';
|
||||||
Aaron marked this conversation as resolved
Outdated
|
|||||||
|
|
||||||
// Load a photo mosaic for the current tag.
|
// 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))
|
if (isset($mosaic))
|
||||||
{
|
{
|
||||||
$index = new PhotosIndex($mosaic, Registry::get('user')->isAdmin());
|
$index = new PhotosIndex($mosaic, Registry::get('user')->isAdmin());
|
||||||
@ -235,7 +238,6 @@ class ViewPhotoAlbum extends HTMLController
|
|||||||
{
|
{
|
||||||
Aaron marked this conversation as resolved
minnozz
commented
Unused here Unused here
|
|||||||
$back_link = BASEURL . '/people/';
|
$back_link = BASEURL . '/people/';
|
||||||
$back_link_title = 'Back to "People"';
|
$back_link_title = 'Back to "People"';
|
||||||
$is_person = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$description = !empty($tag->description) ? $tag->description : '';
|
$description = !empty($tag->description) ? $tag->description : '';
|
||||||
|
Loading…
Reference in New Issue
Block a user
$is_person
is never set(At $employer we had the convention to always use
!== null
instead ofisset
when you expect the variable to exist to catch these kind of errors.empty()
was also discouraged for this reason)Yeah, I don't like this either. I've opted instead to explicitly declare it as a boolean before it's used.