Sort People tags descending; Albums ascending.
This commit is contained in:
parent
9f92ed6d7a
commit
1623a430e5
@ -39,6 +39,7 @@ class ViewPhotoAlbum extends HTMLController
|
|||||||
{
|
{
|
||||||
$back_link = BASEURL . '/people/';
|
$back_link = BASEURL . '/people/';
|
||||||
$back_link_title = 'Back to "People"';
|
$back_link_title = 'Back to "People"';
|
||||||
|
$is_person = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$header_box = new AlbumHeaderBox($title, $description, $back_link, $back_link_title);
|
$header_box = new AlbumHeaderBox($title, $description, $back_link, $back_link_title);
|
||||||
@ -84,7 +85,7 @@ class ViewPhotoAlbum extends HTMLController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load a photo mosaic for the current tag.
|
// Load a photo mosaic for the current tag.
|
||||||
list($mosaic, $total_count) = $this->getPhotoMosaic($id_tag, $page);
|
list($mosaic, $total_count) = $this->getPhotoMosaic($id_tag, $page, !isset($is_person));
|
||||||
if (isset($mosaic))
|
if (isset($mosaic))
|
||||||
{
|
{
|
||||||
$index = new PhotosIndex($mosaic, Registry::get('user')->isAdmin());
|
$index = new PhotosIndex($mosaic, Registry::get('user')->isAdmin());
|
||||||
@ -111,13 +112,13 @@ class ViewPhotoAlbum extends HTMLController
|
|||||||
($page > 1 ? 'page/' . $page . '/' : ''));
|
($page > 1 ? 'page/' . $page . '/' : ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPhotoMosaic($id_tag, $page)
|
public function getPhotoMosaic($id_tag, $page, $sort_linear)
|
||||||
{
|
{
|
||||||
// Create an iterator.
|
// Create an iterator.
|
||||||
list($this->iterator, $total_count) = AssetIterator::getByOptions([
|
list($this->iterator, $total_count) = AssetIterator::getByOptions([
|
||||||
'id_tag' => $id_tag,
|
'id_tag' => $id_tag,
|
||||||
'order' => 'date_captured',
|
'order' => 'date_captured',
|
||||||
'direction' => $id_tag > 0 ? 'asc' : 'desc',
|
'direction' => $sort_linear ? 'asc' : 'desc',
|
||||||
'limit' => self::PER_PAGE,
|
'limit' => self::PER_PAGE,
|
||||||
'page' => $page,
|
'page' => $page,
|
||||||
], true);
|
], true);
|
||||||
|
Loading…
Reference in New Issue
Block a user