Bläddra i källkod

- Allow DBObjects to be deleted by the standard UI 'Delete', which may be useful in case a DBObject has to be deleted as a dependent object of a CMDBObject.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@945 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 år sedan
förälder
incheckning
6f70eed830
1 ändrade filer med 15 tillägg och 0 borttagningar
  1. 15 0
      core/dbobject.class.php

+ 15 - 0
core/dbobject.class.php

@@ -942,6 +942,11 @@ abstract class DBObject
 		$this->Reload();
 		return $this->m_iKey;
 	}
+	
+	public function DBInsertTracked(CMDBChange $oVoid)
+	{
+		return $this->DBInsert();
+	}
 
 	// Creates a copy of the current object into the database
 	// Returns the id of the newly created object
@@ -1020,6 +1025,11 @@ abstract class DBObject
 
 		return $this->m_iKey;
 	}
+	
+	public function DBUpdateTracked(CMDBChange $oVoid)
+	{
+		return $this->DBUpdate();
+	}
 
 	// Make the current changes persistent - clever wrapper for Insert or Update
 	public function DBWrite()
@@ -1051,6 +1061,11 @@ abstract class DBObject
 		$this->m_iKey = null;
 	}
 
+	public function DBDeleteTracked(CMDBChange $oVoid)
+	{
+		$this->DBDelete();
+	}
+
 	public function EnumTransitions()
 	{
 		$sStateAttCode = MetaModel::GetStateAttributeCode(get_class($this));