mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Fixed usage of deprecated Form->dataFieldByName()
This commit is contained in:
parent
a6c586ae20
commit
4524d1c594
@ -44,7 +44,7 @@ class SiteTreeURLSegmentField extends TextField {
|
|||||||
* @return SiteTree
|
* @return SiteTree
|
||||||
*/
|
*/
|
||||||
function getPage() {
|
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');
|
return ($idField && $idField->Value()) ? DataObject::get_by_id('SiteTree', $idField->Value()) : singleton('SiteTree');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user