MINOR: Use castingHelper() rather than castingHelperPair() to look for a field presence. (from r101091)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@111635 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-04 06:06:50 +00:00
parent 10081b2911
commit da16a507ae

View File

@ -502,7 +502,7 @@ JS;
// DataObject::fieldExists only checks the current class, not the hierarchy
// 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;
}