#1472 - PageComment Spam is shown in RSS (merged from 2.1.1 branch, r43586)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@44207 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-11-04 21:43:48 +00:00
parent 7a564c5154
commit 59dc14d010

View File

@ -170,7 +170,7 @@ class PageComment extends DataObject {
} }
function rss() { function rss() {
$parentcheck = isset($_REQUEST['pageid']) ? "ParentID = {$_REQUEST['pageid']}" : "ParentID > 0"; $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)) { if(!isset($comments)) {
$comments = new DataObjectSet(); $comments = new DataObjectSet();
} }