Browse Source

#1079 DBWriteLinks deleting related objects

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3572 a333f486-631f-4898-b8df-5754b55c2be0
romainq 10 years ago
parent
commit
51c07f3900
1 changed files with 3 additions and 2 deletions
  1. 3 2
      core/dbobject.class.php

+ 3 - 2
core/dbobject.class.php

@@ -1,5 +1,5 @@
 <?php
-// Copyright (C) 2010-2014 Combodo SARL
+// Copyright (C) 2010-2015 Combodo SARL
 //
 //   This file is part of iTop.
 //
@@ -52,7 +52,7 @@ interface iDisplay
 /**
  * Class dbObject: the root of persistent classes
  *
- * @copyright   Copyright (C) 2010-2012 Combodo SARL
+ * @copyright   Copyright (C) 2010-2015 Combodo SARL
  * @license     http://opensource.org/licenses/AGPL-3.0
  */
 
@@ -1332,6 +1332,7 @@ abstract class DBObject implements iDisplay
 		foreach(MetaModel::ListAttributeDefs(get_class($this)) as $sAttCode=>$oAttDef)
 		{
 			if (!$oAttDef->IsLinkSet()) continue;
+			if (!array_key_exists($sAttCode, $this->m_aModifiedAtt)) continue;
 			
 			$oOriginalSet = $this->m_aOrigValues[$sAttCode];
 			if ($oOriginalSet != null)