mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-22 06:46:05 -04:00
Don't show the pager if there're no photos on the page.
This commit is contained in:
@@ -122,13 +122,15 @@ class Theme_View_Core extends View {
|
||||
}
|
||||
|
||||
public function pager() {
|
||||
$this->pagination = new Pagination();
|
||||
$this->pagination->initialize(
|
||||
array('query_string' => 'page',
|
||||
'total_items' => $this->children_count,
|
||||
'items_per_page' => $this->page_size,
|
||||
'style' => 'classic'));
|
||||
return $this->pagination->render();
|
||||
if ($this->children_count) {
|
||||
$this->pagination = new Pagination();
|
||||
$this->pagination->initialize(
|
||||
array('query_string' => 'page',
|
||||
'total_items' => $this->children_count,
|
||||
'items_per_page' => $this->page_size,
|
||||
'style' => 'classic'));
|
||||
return $this->pagination->render();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user