summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/photos.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/controllers/photos.php')
-rw-r--r--modules/gallery/controllers/photos.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php
index d500a92e..4578747d 100644
--- a/modules/gallery/controllers/photos.php
+++ b/modules/gallery/controllers/photos.php
@@ -28,10 +28,10 @@ class Photos_Controller extends Items_Controller {
access::required("view", $photo);
$where = array(array("type", "!=", "album"));
- $position = $photo->parent()->get_position($photo, $where);
+ $position = item::get_position($photo, $where);
if ($position > 1) {
list ($previous_item, $ignore, $next_item) =
- $photo->parent()->children(3, $position - 2, $where);
+ $photo->parent()->viewable()->children(3, $position - 2, $where);
} else {
$previous_item = null;
list ($next_item) = $photo->parent()->viewable()->children(1, $position, $where);