From 3c672bd8650a0c447a447d0e6352bf849ea4c595 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 8 Mar 2009 03:57:02 +0000 Subject: Don't show the pager if there're no photos on the page. --- core/libraries/Theme_View.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'core') 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(); + } } /** -- cgit v1.2.3