summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/photos.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-09-22 05:35:21 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-09-22 05:35:21 -0700
commit05275e2c07549ae9c40e647154fa442d796918b8 (patch)
treecf287cfb40ce35b9dc7cb8de2d073be0ed788f94 /modules/gallery/controllers/photos.php
parentdd31b1d39f9a342afc82cc7e446e36454a882cf9 (diff)
parent22296907b77a00aa28e174b6e0231faed7c10fcd (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/gallery/controllers/photos.php')
-rw-r--r--modules/gallery/controllers/photos.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php
index 79ad674a..81e7519e 100644
--- a/modules/gallery/controllers/photos.php
+++ b/modules/gallery/controllers/photos.php
@@ -25,23 +25,23 @@ class Photos_Controller extends Items_Controller {
public function _show($photo) {
access::required("view", $photo);
- $position = $photo->parent()->get_position($photo->id);
+ $position = $photo->parent()->get_position($photo);
if ($position > 1) {
list ($previous_item, $ignore, $next_item) =
$photo->parent()->children(3, $position - 2);
} else {
$previous_item = null;
- list ($next_item) = $photo->parent()->children(1, $position);
+ list ($next_item) = $photo->parent()->viewable()->children(1, $position);
}
$template = new Theme_View("page.html", "photo");
$template->set_global("item", $photo);
$template->set_global("children", array());
- $template->set_global("children_count", $photo->children_count());
+ $template->set_global("children_count", 0);
$template->set_global("parents", $photo->parents());
$template->set_global("next_item", $next_item);
$template->set_global("previous_item", $previous_item);
- $template->set_global("sibling_count", $photo->parent()->children_count());
+ $template->set_global("sibling_count", $photo->parent()->viewable()->children_count());
$template->set_global("position", $position);
$template->content = new View("photo.html");