BUGFIX: Fix comment feed on SQLServer (from r89641)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@89825 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-10-21 04:52:37 +00:00
parent 9cd09d53f8
commit 780338c6d7

View File

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