addition of ApprovedComments function

So comment count only displays moderated comments.
This commit is contained in:
RuthAdele 2013-10-23 10:44:22 +10:30
parent 576e462823
commit d5daef57ff

View File

@ -216,6 +216,13 @@ class BlogEntry extends Page {
return $holder;
}
/**
* Get count of moderated comments only
*/
public function getApprovedComments(){
return $this->Comments('Comment.Moderated = 1');
}
}
class BlogEntry_Controller extends Page_Controller {