mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 09:05:58 +00: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;
|
return $holder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get count of moderated comments only
|
||||||
|
*/
|
||||||
|
public function getApprovedComments(){
|
||||||
|
return $this->Comments('Comment.Moderated = 1');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BlogEntry_Controller extends Page_Controller {
|
class BlogEntry_Controller extends Page_Controller {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user