BUG FIX: column names quoted properly

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@100688 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Geoff Munn 2010-03-09 02:27:25 +00:00 committed by Sam Minnee
parent 2a9be51b90
commit ff236fe98d

View File

@ -178,7 +178,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();
}