diff --git a/var/Widget/Archive.php b/var/Widget/Archive.php index d7ea6379..09cdc96d 100644 --- a/var/Widget/Archive.php +++ b/var/Widget/Archive.php @@ -1497,7 +1497,11 @@ class Widget_Archive extends Widget_Abstract_Contents */ public function attachments($limit = 0, $offset = 0) { - return $this->widget('Widget_Contents_Attachment_Related', array('parentId' => $this->cid, 'limit' => $limit)); + return $this->widget('Widget_Contents_Attachment_Related', array( + 'parentId' => $this->cid, + 'limit' => $limit, + 'offset' => $offset + )); } /** diff --git a/var/Widget/Contents/Attachment/Related.php b/var/Widget/Contents/Attachment/Related.php index d90ac865..b1b7e907 100644 --- a/var/Widget/Contents/Attachment/Related.php +++ b/var/Widget/Contents/Attachment/Related.php @@ -48,6 +48,10 @@ class Widget_Contents_Attachment_Related extends Widget_Abstract_Contents $select->limit($this->parameter->limit); } + if ($this->parameter->offset > 0) { + $select->offset($this->parameter->offset); + } + $this->db->fetchAll($select, array($this, 'push')); } }