diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-03-08 03:57:02 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-03-08 03:57:02 +0000 |
commit | 3c672bd8650a0c447a447d0e6352bf849ea4c595 (patch) | |
tree | c4c708d2fbb5f4b31efc8c4a99bc5a0c43190d1a | |
parent | 2ef8e2819854481c2b7d6469c30a96b41fb979dd (diff) |
Don't show the pager if there're no photos on the page.
-rw-r--r-- | core/libraries/Theme_View.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/core/libraries/Theme_View.php b/core/libraries/Theme_View.php index ea2a17f9..e992103f 100644 --- a/core/libraries/Theme_View.php +++ b/core/libraries/Theme_View.php @@ -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(); + } } /** |