From df1ebaebf9b2afab7081e0bd826fffca1b43841a Mon Sep 17 00:00:00 2001 From: Guillaume Lajarige Date: Thu, 5 Oct 2017 15:38:27 +0000 Subject: [PATCH] =?UTF-8?q?N=C2=B01104=20DBObject::=5F=5FtoString()=20was?= =?UTF-8?q?=20way=20too=20verbose=20and=20returned=20all=20objects=20from?= =?UTF-8?q?=20linksets=20as=20string=20as=20well,=20causing=20memory=20lim?= =?UTF-8?q?its.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SVN:trunk[4971] --- core/dbobject.class.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/core/dbobject.class.php b/core/dbobject.class.php index f844b34d6b..3fafed51dc 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -159,18 +159,13 @@ abstract class DBObject implements iDisplay public function __toString() { - $sRet = ''; - $sClass = get_class($this); - $sRootClass = MetaModel::GetRootClass($sClass); - $iPKey = $this->GetKey(); - $sRet .= "$sClass::$iPKey
\n"; - $sRet .= ""; - return $sRet; + $sRet = ''; + $sClass = get_class($this); + $sRootClass = MetaModel::GetRootClass($sClass); + $iPKey = $this->GetKey(); + $sFriendlyname = $this->Get('friendlyname'); + $sRet .= "$sClass::$iPKey ($sFriendlyname)
\n"; + return $sRet; } // Restore initial values... mmmm, to be discussed