From 1e02df02f94529550e38913746eb75185de5338e Mon Sep 17 00:00:00 2001
From: Andrew O'Neil
Date: Sun, 12 Aug 2007 23:39:18 +0000
Subject: [PATCH] Unmoderated comments have unmoderated css class on them
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@39893 467b73ca-7a2a-4603-9d3b-597d59a354a9
---
code/sitefeatures/PageComment.php | 2 ++
templates/PageCommentInterface_singlecomment.ss | 3 ---
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/code/sitefeatures/PageComment.php b/code/sitefeatures/PageComment.php
index e9741956..330b6dc1 100755
--- a/code/sitefeatures/PageComment.php
+++ b/code/sitefeatures/PageComment.php
@@ -72,6 +72,8 @@ class PageComment extends DataObject {
function SpamClass() {
if($this->getField('IsSpam')) {
return 'spam';
+ } else if($this->getField('NeedsModeration')) {
+ return 'unmoderated';
} else {
return 'notspam';
}
diff --git a/templates/PageCommentInterface_singlecomment.ss b/templates/PageCommentInterface_singlecomment.ss
index 2f8a8de2..d2b5998c 100755
--- a/templates/PageCommentInterface_singlecomment.ss
+++ b/templates/PageCommentInterface_singlecomment.ss
@@ -1,7 +1,4 @@
Unmoderated comment
- <% end_if %>
$Comment.XML