forked from Public/pics
ViewPhotoAlbum: don't include empty $by in page links
This commit is contained in:
parent
c0dd2cbd49
commit
30bc0bb884
@ -60,7 +60,7 @@ class ViewPhotoAlbum extends HTMLController
|
|||||||
'label' => $contributor['first_name'],
|
'label' => $contributor['first_name'],
|
||||||
'caption' => sprintf('By %s (%s photos)',
|
'caption' => sprintf('By %s (%s photos)',
|
||||||
$contributor['first_name'], $contributor['num_assets']),
|
$contributor['first_name'], $contributor['num_assets']),
|
||||||
'link' => $tag->getUrl() . '/?by=' . $contributor['slug'],
|
'link' => $tag->getUrl() . '?by=' . $contributor['slug'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ class ViewPhotoAlbum extends HTMLController
|
|||||||
'items_per_page' => self::PER_PAGE,
|
'items_per_page' => self::PER_PAGE,
|
||||||
'start' => ($current_page - 1) * self::PER_PAGE,
|
'start' => ($current_page - 1) * self::PER_PAGE,
|
||||||
'base_url' => $tag->getUrl(),
|
'base_url' => $tag->getUrl(),
|
||||||
'page_slug' => 'page/%PAGE%/' . (isset($active_filter) ? '?by=' . $active_filter : ''),
|
'page_slug' => 'page/%PAGE%/' . (!empty($active_filter) ? '?by=' . $active_filter : ''),
|
||||||
'index_class' => 'pagination-lg justify-content-around justify-content-lg-center',
|
'index_class' => 'pagination-lg justify-content-around justify-content-lg-center',
|
||||||
]);
|
]);
|
||||||
$this->page->adopt(new PageIndexWidget($index));
|
$this->page->adopt(new PageIndexWidget($index));
|
||||||
|
Loading…
Reference in New Issue
Block a user