BUGFIX: getByKey replaced with objectForKey

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97307 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Geoff Munn 2010-01-21 00:39:18 +00:00 committed by Sam Minnee
parent ed5c173366
commit 597108989e

View File

@ -275,7 +275,7 @@ class TreeDropdownField_Readonly extends TreeDropdownField {
function Field() { function Field() {
$fieldName = $this->labelField; $fieldName = $this->labelField;
if($this->value) { if($this->value) {
$keyObj = $this->getByKey($this->value); $keyObj = $this->objectForKey($this->value);
$obj = $keyObj ? $keyObj->$fieldName : ''; $obj = $keyObj ? $keyObj->$fieldName : '';
} else { } else {
$obj = null; $obj = null;