Code Duplication    Length = 11-11 lines in 2 locations

code/extensions/CommentsExtension.php 1 location

@@ 262-272 (lines=11) @@
259
	 *
260
	 * @return PaginatedList
261
	 */
262
	public function PagedComments() {
263
		$list = $this->Comments();
264
265
		// Add pagination
266
		$list = new PaginatedList($list, Controller::curr()->getRequest());
267
		$list->setPaginationGetVar('commentsstart' . $this->owner->ID);
268
		$list->setPageLength($this->owner->getCommentsOption('comments_per_page'));
269
270
		$this->owner->extend('updatePagedComments', $list);
271
		return $list;
272
	}
273
274
	/**
275
	 * Check if comments are configured for this page even if they are currently disabled.

code/model/Comment.php 1 location

@@ 740-750 (lines=11) @@
737
	 *
738
	 * @return PaginatedList
739
	 */
740
	public function PagedReplies() {
741
		$list = $this->Replies();
742
743
		// Add pagination
744
		$list = new PaginatedList($list, Controller::curr()->getRequest());
745
		$list->setPaginationGetVar('repliesstart'.$this->ID);
746
		$list->setPageLength($this->getOption('comments_per_page'));
747
748
		$this->extend('updatePagedReplies', $list);
749
		return $list;
750
	}
751
752
	/**
753
	 * Generate a reply form for this comment