diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-09-13 01:04:41 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-09-13 01:04:41 -0700 |
commit | 71a2e3624e05302725281c19b23beba252183a15 (patch) | |
tree | d3500cee71112cc346df221510b0c2ecbbdbf64f | |
parent | bc69dfb410ac0b35e4f2caa2230858eb15322a9a (diff) | |
parent | caa2002d7777e0ceb884d4c628650804620ca2b6 (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3 into beta3_staging
-rw-r--r-- | modules/gallery/controllers/albums.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 183c26d0..08a60132 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -40,11 +40,13 @@ class Albums_Controller extends Items_Controller { if ($show) { $index = $album->get_position($show); - $page = ceil($index / $page_size); - if ($page == 1) { - url::redirect($album->abs_url()); - } else { - url::redirect($album->abs_url("page=$page")); + if ($index) { + $page = ceil($index / $page_size); + if ($page == 1) { + url::redirect($album->abs_url()); + } else { + url::redirect($album->abs_url("page=$page")); + } } } |