diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-19 01:26:49 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-19 01:26:49 +0000 |
commit | 8b3e2445781d09825fa4f7d65b34011f7006d35a (patch) | |
tree | 08acbcb44782df7d5bfe819be183bec627c1873c | |
parent | c00dc21ba82a06727078a65a15ffce961d16787a (diff) |
We always have at least 1 page in an album.
-rw-r--r-- | core/controllers/albums.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/controllers/albums.php b/core/controllers/albums.php index d2453447..e84968c3 100644 --- a/core/controllers/albums.php +++ b/core/controllers/albums.php @@ -34,7 +34,7 @@ class Albums_Controller extends Items_Controller { $offset = ($page-1) * $page_size; // Make sure that the page references a valid offset - if ($page < 1 || $page > ceil($children_count / $page_size)) { + if ($page < 1 || $page > max(ceil($children_count / $page_size), 1)) { Kohana::show_404(); } |