Jelajahi Sumber

Delta revision id can be stored into the XML delta

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2818 a333f486-631f-4898-b8df-5754b55c2be0
romainq 12 tahun lalu
induk
melakukan
5a2c44ffa1
1 mengubah file dengan 5 tambahan dan 1 penghapusan
  1. 5 1
      setup/modelfactory.class.inc.php

+ 5 - 1
setup/modelfactory.class.inc.php

@@ -1259,7 +1259,7 @@ EOF
 	/**
 	 * Get the text/XML version of the delta
 	 */	
-	public function GetDelta($aNodesToIgnore = array())
+	public function GetDelta($aNodesToIgnore = array(), $iRevisionId = null)
 	{
 		$oDelta = new MFDocument();
 		foreach($this->ListChanges() as $oAlteredNode)
@@ -1274,6 +1274,10 @@ EOF
 				$oNode->parentNode->removeChild($oNode);
 			}
 		}
+		if ($iRevisionId != null)
+		{
+			$oDelta->documentElement->setAttribute('revision_id', $iRevisionId);
+		}
 		return $oDelta->saveXML();
 	}