mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-23 04:49:11 -04:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user