Browse Source

Allow filtering the Delta output...

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2794 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 12 năm trước cách đây
mục cha
commit
c165f0e661
1 tập tin đã thay đổi với 9 bổ sung1 xóa
  1. 9 1
      setup/modelfactory.class.inc.php

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

@@ -1220,13 +1220,21 @@ EOF
 	/**
 	 * Get the text/XML version of the delta
 	 */	
-	public function GetDelta()
+	public function GetDelta($aNodesToIgnore = array())
 	{
 		$oDelta = new MFDocument();
 		foreach($this->ListChanges() as $oAlteredNode)
 		{
 			$this->ImportNodeAndPathDelta($oDelta, $oAlteredNode);
 		}
+		foreach($aNodesToIgnore as $sXPath)
+		{
+			$oNodesToRemove = $oDelta->GetNodes($sXPath);
+			foreach($oNodesToRemove as $oNode)
+			{
+				$oNode->parentNode->removeChild($oNode);
+			}
+		}
 		return $oDelta->saveXML();
 	}