diff --git a/code/sitefeatures/PageComment.php b/code/sitefeatures/PageComment.php index 34f21ccc..408cc118 100755 --- a/code/sitefeatures/PageComment.php +++ b/code/sitefeatures/PageComment.php @@ -161,7 +161,8 @@ 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 NOT \"IsSpam\"", "\"Created\" DESC", "", 10); + $unmoderatedfilter = Permission::check('ADMIN') ? '' : "AND NOT \"NeedsModeration\""; + $comments = DataObject::get("PageComment", "$parentcheck AND NOT \"IsSpam\" $unmoderatedfilter", "\"Created\" DESC", "", 10); if(!isset($comments)) { $comments = new DataObjectSet(); } @@ -281,4 +282,4 @@ class PageComment_Controller extends Controller { } -?> \ No newline at end of file +?>