diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/controllers/photos.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/controllers/photos.php b/core/controllers/photos.php index 82f9b779..d59ce26d 100644 --- a/core/controllers/photos.php +++ b/core/controllers/photos.php @@ -49,8 +49,8 @@ class Photos_Controller extends Items_Controller { $template->set_global("children", array()); $template->set_global("children_count", $photo->children_count()); $template->set_global("parents", $photo->parents()); - $template->set_global("next_item", $next_item); - $template->set_global("previous_item", $previous_item); + $template->set_global("next_item", $next_item->loaded ? $next_item : null); + $template->set_global("previous_item", $previous_item->loaded ? $previous_item : null); $template->set_global("sibling_count", $photo->parent()->children_count()); $template->set_global("position", $position); |