MINOR Fixed usage of deprecated Form->dataFieldByName()

This commit is contained in:
Ingo Schommer 2012-04-05 23:00:04 +02:00
parent a6c586ae20
commit 4524d1c594

View File

@ -44,7 +44,7 @@ class SiteTreeURLSegmentField extends TextField {
* @return SiteTree
*/
function getPage() {
$idField = $this->getForm()->dataFieldByName('ID');
$idField = $this->getForm()->Fields()->dataFieldByName('ID');
return ($idField && $idField->Value()) ? DataObject::get_by_id('SiteTree', $idField->Value()) : singleton('SiteTree');
}