From 4672eb75bdd6a308140dfab01a62ed74e88e6cff Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 21 Apr 2012 15:13:46 +0200 Subject: [PATCH] todo: pagination of replies --- htdocs/application/models/pastes.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/application/models/pastes.php b/htdocs/application/models/pastes.php index a7dbb5f..0c03bef 100755 --- a/htdocs/application/models/pastes.php +++ b/htdocs/application/models/pastes.php @@ -243,10 +243,14 @@ class Pastes extends CI_Model if ($replies) { + + //todo + $amount = $this->config->item('per_page'); + $page = $this->uri->segment(2); $this->db->select('title, name, created, pid, snipurl'); $this->db->where('replyto', $data['pid']); $this->db->order_by('id', 'desc'); - $this->db->limit(100); + $this->db->limit($amount); $query = $this->db->get('pastes'); if ($query->num_rows() > 0)