Extend siblings callbacks to take a $limit and an $offset for navigating

large sibling sets.  Useful for the thumbnav module since we don't want to
iterate a thousand siblings to find the one we care about.  Fixes #1999.
This commit is contained in:
Bharat Mediratta
2013-02-09 14:53:34 -05:00
parent 8c5d5525d0
commit 9dbe2e15ad
3 changed files with 8 additions and 6 deletions

View File

@@ -86,8 +86,10 @@ class Theme_View_Core extends Gallery_View {
return $this->item;
}
public function siblings() {
return call_user_func_array($this->siblings_callback[0], $this->siblings_callback[1]);
public function siblings($limit=null, $offset=null) {
return call_user_func_array(
$this->siblings_callback[0],
array_merge($this->siblings_callback[1], array($offset, $limit)));
}
public function tag() {