N°1104 DBObject::__toString() was way too verbose and returned all objects from linksets as string as well, causing memory limits.

SVN:trunk[4971]
This commit is contained in:
Guillaume Lajarige
2017-10-05 15:38:27 +00:00
parent 26bd04857d
commit df1ebaebf9

View File

@@ -163,13 +163,8 @@ abstract class DBObject implements iDisplay
$sClass = get_class($this); $sClass = get_class($this);
$sRootClass = MetaModel::GetRootClass($sClass); $sRootClass = MetaModel::GetRootClass($sClass);
$iPKey = $this->GetKey(); $iPKey = $this->GetKey();
$sRet .= "<b title=\"$sRootClass\">$sClass</b>::$iPKey<br/>\n"; $sFriendlyname = $this->Get('friendlyname');
$sRet .= "<ul class=\"treeview\">\n"; $sRet .= "<b title=\"$sRootClass\">$sClass</b>::$iPKey ($sFriendlyname)<br/>\n";
foreach(MetaModel::ListAttributeDefs(get_class($this)) as $sAttCode=>$oAttDef)
{
$sRet .= "<li>".$oAttDef->GetLabel()." = ".$this->GetAsHtml($sAttCode)."</li>\n";
}
$sRet .= "</ul>";
return $sRet; return $sRet;
} }