Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #1855 from minerbog/patch-1
Update system/cms/modules/comments/models/comments_m.php
  • Loading branch information
Phil Sturgeon committed Sep 16, 2012
2 parents fd03a2b + a9ef8cb commit 11e50a7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions system/cms/modules/comments/models/comments_m.php
Expand Up @@ -35,13 +35,16 @@ public function get($id)
*
*
* @param int $limit The amount of comments to get
* @param int $is_active set default to only return active comments
* @return array
*/
public function get_recent($limit = 10)
public function get_recent($limit = 10, $is_active = 1)
{
$this->_get_all_setup();

$this->db->order_by('c.created_on', 'desc');
$this->db
->where('c.is_active', $is_active)
->order_by('c.created_on', 'desc');

if ($limit > 0)
{
Expand Down

0 comments on commit 11e50a7

Please sign in to comment.