mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Fixed quoting in WidgetAreaEditor
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@77991 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
40a2c3bb7c
commit
a1f8fb3049
@ -73,7 +73,11 @@ class WidgetAreaEditor extends FormField {
|
||||
// \"ParentID\" = '0' is for the new page
|
||||
$widget = DataObject::get_one(
|
||||
'Widget',
|
||||
"(\"ParentID\" = '{$record->$name()->ID}' OR \"ParentID\" = '0') AND \"Widget\".\"ID\" = '$newWidgetID'"
|
||||
sprintf(
|
||||
'("ParentID" = %d OR "ParentID" = 0) AND "Widget"."ID" = %d',
|
||||
$record->$name()->ID,
|
||||
(int)$newWidgetID
|
||||
)
|
||||
);
|
||||
|
||||
// check if we are updating an existing widget
|
||||
|
Loading…
Reference in New Issue
Block a user