ENHANCEMENT: do not show comments that need moderation in the comment rss feed

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@103659 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Saophalkun Ponlu 2010-04-28 05:33:18 +00:00 committed by Sam Minnee
parent 88f8ff468f
commit 37c1b8238d

View File

@ -152,7 +152,7 @@ class PageComment extends DataObject {
class PageComment_Controller extends Controller {
function rss() {
$parentcheck = isset($_REQUEST['pageid']) ? "ParentID = " . (int) $_REQUEST['pageid'] : "ParentID > 0";
$comments = DataObject::get("PageComment", "$parentcheck AND IsSpam=0", "Created DESC", "", 10);
$comments = DataObject::get("PageComment", "$parentcheck AND IsSpam=0 AND NeedsModeration = 0", "Created DESC", "", 10);
if(!isset($comments)) {
$comments = new DataObjectSet();
}