Bug fix: when doing a bulk modify (or bulk apply stimulus) the external keys that were read-only in the edition form were displayed as "ClassName #id" instead of using their friendly name. This is now fixed, but requires a load of the target object.

SVN:trunk[1186]
This commit is contained in:
Denis Flaven
2011-04-06 19:13:08 +00:00
parent 089a9fcf4a
commit 1a74fe1ec3

View File

@@ -524,7 +524,11 @@ abstract class DBObject
//
if (empty($sLabel))
{
$sLabel = MetaModel::GetName($sObjClass)." #$sObjKey";
// If the object if not issued from a query but constructed programmatically
// the label may be empty. In this case run a query to get the object's friendly name
$oTmpObj = MetaModel::GetObject($sObjClass, $sObjKey);
$sLabel = $oTmpObj->GetName();
//$sLabel = MetaModel::GetName($sObjClass)." #$sObjKey";
}
$sHint = MetaModel::GetName($sObjClass)."::$sObjKey";
return "<a href=\"{$sAbsoluteUrl}{$sPage}?operation=details&class=$sObjClass&id=$sObjKey&".$oAppContext->GetForLink()."\" title=\"$sHint\">$sLabel</a>";