summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-09-13 22:31:23 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-09-13 22:31:23 -0700
commit0b0586a224777bb12d86b5661f7826d48137873c (patch)
tree76d626b67200ee142ebb8a94240cb2d7aa50e6cb /modules/gallery/controllers
parentdbeadfc2ab7e645a9e5a92e05cb5d90f4329480c (diff)
parentc527e70f26a85403633c9c8c7d32cc3b30cf625e (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/gallery/controllers')
-rw-r--r--modules/gallery/controllers/albums.php12
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"));
+ }
}
}