mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR: Use castingHelper() rather than castingHelperPair() to look for a field presence.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@101091 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4e8aa378b9
commit
fd42eae95b
@ -562,7 +562,7 @@ JS;
|
|||||||
|
|
||||||
// DataObject::fieldExists only checks the current class, not the hierarchy
|
// DataObject::fieldExists only checks the current class, not the hierarchy
|
||||||
// This allows the CMS to set the correct sort value
|
// This allows the CMS to set the correct sort value
|
||||||
if($newItem->castingHelperPair('Sort')) {
|
if($newItem->castingHelper('Sort')) {
|
||||||
$newItem->Sort = DB::query("SELECT MAX(\"Sort\") FROM \"SiteTree\" WHERE \"ParentID\" = '" . Convert::raw2sql($parentID) . "'")->value() + 1;
|
$newItem->Sort = DB::query("SELECT MAX(\"Sort\") FROM \"SiteTree\" WHERE \"ParentID\" = '" . Convert::raw2sql($parentID) . "'")->value() + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user