mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
addition of ApprovedComments function
So comment count only displays moderated comments.
This commit is contained in:
parent
576e462823
commit
d5daef57ff
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user