summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/albums.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/controllers/albums.php')
-rw-r--r--modules/gallery/controllers/albums.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index 9b968871..0fb033a8 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2012 Bharat Mediratta
+ * Copyright (C) 2000-2013 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -93,10 +93,16 @@ class Albums_Controller extends Items_Controller {
"previous_item" => $previous_item,
"next_item" => $next_item,
"sibling_count" => $item->parent()->viewable()->children_count($where),
+ "siblings_callback" => array("Albums_Controller::get_siblings", array($item)),
"parents" => $item->parents()->as_array(),
"breadcrumbs" => Breadcrumb::array_from_item_parents($item));
}
+ static function get_siblings($item, $limit=null, $offset=null) {
+ // @todo consider creating Item_Model::siblings() if we use this more broadly.
+ return $item->parent()->viewable()->children($limit, $offset);
+ }
+
public function create($parent_id) {
access::verify_csrf();
$album = ORM::factory("item", $parent_id);