diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-13 22:31:23 -0700 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-13 22:31:23 -0700 |
| commit | 0b0586a224777bb12d86b5661f7826d48137873c (patch) | |
| tree | 76d626b67200ee142ebb8a94240cb2d7aa50e6cb /modules/gallery/controllers | |
| parent | dbeadfc2ab7e645a9e5a92e05cb5d90f4329480c (diff) | |
| parent | c527e70f26a85403633c9c8c7d32cc3b30cf625e (diff) | |
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/gallery/controllers')
| -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")); + } } } |
