From 3330fd79d004fd3e5c6c4bdb4fb3c0b44f33b631 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Wed, 24 Oct 2012 13:20:26 +0000 Subject: [PATCH] Bug fix: regression introduced by revision 2278. SVN:1.2[2340] --- core/dbobject.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/dbobject.class.php b/core/dbobject.class.php index 3874edbd6..ed7f98194 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -439,7 +439,7 @@ abstract class DBObject $oAttDef = MetaModel::GetAttributeDef(get_class($this), $sAttCode); if ($oAttDef->IsExternalField()) { - $sKeyAttCode = $sAttCode; + $sKeyAttCode = $oAttDef->GetKeyAttCode(); $iCurrKey = $this->m_aCurrValues[$oAttDef->GetKeyAttCode()]; $sTargetClass= $oAttDef->GetTargetClass(); } @@ -471,8 +471,8 @@ abstract class DBObject } else { - $this->m_aLoadedAtt[$sAttCode.'_friendlyname'] = true; - $this->m_aCurrValues[$sAttCode.'_friendlyname'] = $oTargetObj->GetName(); + $this->m_aLoadedAtt[$sKeyAttCode.'_friendlyname'] = true; + $this->m_aCurrValues[$sKeyAttCode.'_friendlyname'] = $oTargetObj->GetName(); } } }