#1472 - PageComment Spam is shown in RSS

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.1.1@43584 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-10-18 04:49:59 +00:00 committed by Sam Minnee
parent 3cd4ae73bc
commit 48c317a3a2

View File

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