From a2f2cb2d229f9d68386852f0a415d1565a515d0a Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Thu, 10 Sep 2009 16:20:35 +0000 Subject: [PATCH] Fixed bug on Update / WriteLinks SVN:trunk[139] --- core/dbobject.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/dbobject.class.php b/core/dbobject.class.php index 9a52b562d..eaca961f4 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -552,7 +552,10 @@ abstract class DBObject while ($oLinkedObject = $oLinks->Fetch()) { $oLinkedObject->Set($oAttDef->GetExtKeyToMe(), $this->m_iKey); - $oLinkedObject->DBWrite(); + if ($oLinkedObject->IsModified()) + { + $oLinkedObject->DBWrite(); + } } // Delete the objects that were initialy present and disappeared from the list