فهرست منبع

Fixed bug on Update / WriteLinks

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@139 a333f486-631f-4898-b8df-5754b55c2be0
romainq 15 سال پیش
والد
کامیت
20de45550e
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      core/dbobject.class.php

+ 4 - 1
core/dbobject.class.php

@@ -552,7 +552,10 @@ abstract class DBObject
 			while ($oLinkedObject = $oLinks->Fetch())
 			while ($oLinkedObject = $oLinks->Fetch())
 			{
 			{
 				$oLinkedObject->Set($oAttDef->GetExtKeyToMe(), $this->m_iKey);
 				$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
 			// Delete the objects that were initialy present and disappeared from the list