mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Allow setting of moderation in _config
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@39719 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
12069c6a96
commit
9099fa1474
@ -151,6 +151,10 @@ class PageComment extends DataObject {
|
||||
static function enableModeration() {
|
||||
self::$moderate = true;
|
||||
}
|
||||
|
||||
static function moderationEnabled() {
|
||||
return self::moderate;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -140,6 +140,8 @@ class PageCommentInterface_Form extends Form {
|
||||
$comment->IsSpam = false;
|
||||
$comment->write();
|
||||
|
||||
$comment->NeedsModeration = PageComment::moderationEnable();
|
||||
|
||||
if(Director::is_ajax()) {
|
||||
echo $comment->renderWith('PageCommentInterface_singlecomment');
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user