Browse Source

#205 Missing object hyperlink when using trigger on object creation

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@783 a333f486-631f-4898-b8df-5754b55c2be0
romainq 14 years ago
parent
commit
974cb20384
1 changed files with 4 additions and 1 deletions
  1. 4 1
      core/dbobject.class.php

+ 4 - 1
core/dbobject.class.php

@@ -334,7 +334,7 @@ abstract class DBObject
 		}
 		}
 		if ($this->m_bIsInDB && !$this->m_aLoadedAtt[$sAttCode] && !$this->m_bDirty)
 		if ($this->m_bIsInDB && !$this->m_aLoadedAtt[$sAttCode] && !$this->m_bDirty)
 		{
 		{
-			// #@# non-scalar attributes.... handle that differentely
+			// #@# non-scalar attributes.... handle that differently
 			$this->Reload();
 			$this->Reload();
 		}
 		}
 		return $this->m_aCurrValues[$sAttCode];
 		return $this->m_aCurrValues[$sAttCode];
@@ -918,6 +918,9 @@ abstract class DBObject
 		$this->DBWriteLinks();
 		$this->DBWriteLinks();
 		$this->m_bIsInDB = true;
 		$this->m_bIsInDB = true;
 		$this->m_bDirty = false;
 		$this->m_bDirty = false;
+		
+		// Arg cache invalidated (in particular, it needs the object key -could be improved later)
+		$this->m_aAsArgs = null;
 
 
 		$this->AfterInsert();
 		$this->AfterInsert();