BUG FIX: column names quoted properly (from r100688)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@111628 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-04 06:01:15 +00:00
parent 75c64136ad
commit 7945c46b49

View File

@ -183,7 +183,7 @@ class PageComment_Controller extends Controller {
if(Permission::check('CMS_ACCESS_CMSMain')) {
$pageId = $_REQUEST['pageid'];
if(preg_match('/^\d+$/', $pageId)) {
$comments = DataObject::get("PageComment", "ParentID = $pageId");
$comments = DataObject::get("PageComment", "\"ParentID\" = $pageId");
if($comments) foreach($comments as $c) {
$c->delete();
}